AWS for Ada的安装问题 [英] Installation issue with AWS for Ada
问题描述
今晚我第一次在Macbook上安装了Ada和AWS。
I installed Ada and AWS on a Macbook for the first time tonight.
安装似乎一切都成功,但是我感觉到AWS并没有t安装到正确的目录。
Everything seemed successful with the installation, but I'm getting the feeling that AWS didn't install to the right directory.
GNAT位于/ usr / local / gnat中。
GNAT is in /usr/local/gnat.
AWS Makefile .conf表示,
The AWS makefile.conf said,
AWS will be installed under $(prefix). Update this variable to point to
the install directory. By default, it is set to the current GNAT root
directory to have AWS project files automatically available.
所以我没有更改目标。
但是当我尝试从系统上除AWS demos文件夹之外的任何地方编译hello_world时,都会出现此错误:
But when I try to compile hello_world from anywhere on the system except the AWS demos folder, I get this error:
~/projects/ada:gnatmake hello.adb
gcc -c hello.adb
hello.adb:1:06: file "aws.ads" not found
hello.adb:2:06: file "aws.ads" not found
hello.adb:3:06: file "aws.ads" not found
hello.adb:4:06: file "aws.ads" not found
gnatmake: "hello.adb" compilation error
如何确保已安装AWS
How can I make sure AWS was installed properly, or move it if it wasn't?
推荐答案
答案(嗯,更多的是对那些知道的人的提示) )的意思是使AWS项目文件自动可用。
The answer (well, more of a hint to those in the know) lies in the words "to have AWS project files automatically available".
在GNAT上下文中,项目文件表示类型为的文件.gpr
告诉构建器( gnatmake
或 gprbuild
)在哪里找到源文件,如何编译em,以及在哪里可以找到此项目所依赖的任何库。
In the GNAT context, "project file" means a file of type .gpr
which tells the builder (gnatmake
or gprbuild
) where to find the source files, how to compile them, and where to find any libraries that "this" project depends on.
创建 hello.gpr
:
with "aws";
project Hello is
for Main use ("hello.adb");
end Hello;
(非常最小)然后
with AWS;
with Ada.Text_IO;
procedure Hello is
begin
Ada.Text_IO.Put_Line ("AWS version is " & AWS.Version);
end Hello;
与
gprbuild -P hello.gpr
输出
AWS version is 2.10.0w
在 gprbuild 和 gnatmake ( gnatmake
被 gprbuild
取代);在您安装的GNAT中可能有位于 $ {prefix} / share / doc
(子目录)中的信息。
There is on-line information on gprbuild and gnatmake (gnatmake
has been superseded by gprbuild
); there is probably information in your installed GNAT at (subdirectories of) ${prefix}/share/doc
.
这篇关于AWS for Ada的安装问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!