无法编译 Ada Web Server AWS hello_world 应用程序

Cannot compile Ada Web Server AWS hello_world application

系统配置:

已安装的软件包:

问题描述:

我在尝试使用 GNAT Programming Studio (GPS) 编译 aws_hello_world 项目时看到以下错误消息:

错误文本:default.gpr:2:6 未知项目文件:"aws"

default.gpr

with "aws"; -- This is the line with the error --

project Default is

   for Source_Dirs use ("src");
   for Object_Dir use "obj";
   for Exec_Dir use ".";

   for Main use ("default-main.adb");

   package Builder is
      for Executable ("default-main.adb") use "default";
   end Builder;

   package Compiler is
      for Switches ("Ada") use ("-gnat05");
   end Compiler;

end Default;

尝试使用命令行构建项目也失败了:

ada_n00b@wasted_planet ~/Desktop/aws_hello_world $ gprbuild
using project file default.gpr
Error: no native compiler found for language 'ada', default runtime 
default.gpr:2:06: unknown project file: "aws"
gprbuild: "default.gpr" processing failed

如能提供有关构建此内容的任何帮助,我们将不胜感激!提前致谢。

您在命令行上收到的错误消息揭示了您的错误:

Error: no native compiler found for language 'ada', default runtime

您可能需要在构建系统上安装软件包 gnat

解决方案是从 AdaCore 安装 GNAT GPL 编译器并使用它来构建 Ada Web 服务器。

我使用的是 Debian 软件包存储库中提供的 FSF GNAT。 Ada Web 服务器未使用 FSF GNAT 构建 "out-of-the-box"。