I installed Ada and AWS on a Macbook for the first time tonight.
Everything seemed successful with the installation, but I’m getting the feeling that AWS didn’t install to the right directory.
GNAT is in /usr/local/gnat.
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.
So I didn’t change the target.
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
How can I make sure AWS was installed properly, or move it if it wasn’t?
The answer (well, more of a hint to those in the know) lies in the words “to have AWS project files automatically available”.
In the GNAT context, “project file” means a file of type
.gprwhich tells the builder (gnatmakeorgprbuild) where to find the source files, how to compile them, and where to find any libraries that “this” project depends on.Create
hello.gpr:(which is very minimal) then
compiled with
outputs
There is on-line information on gprbuild and gnatmake (
gnatmakehas been superseded bygprbuild); there is probably information in your installed GNAT at (subdirectories of)${prefix}/share/doc.