I am trying to get started with Ada programming and would like to compile a file without using GPR Studio
I have installed gnat community with the provided .dmg at $HOME/GNAT/
All the binaries are found at $HOME/GNAT/bin/ and I have added this bin to my path such that they all appear correctly when I type which gps
or another binary in that folder.
Also if I run gps and run a file in it everything works fine.
However here is my problem if i create file hello.abd:
with Ada.Text_IO; use Ada.Text_IO;
procedure Hello is
begin
Put_Line ("Hello World!");
end Hello;
and then run gnatmake hello.abd
I get:
gcc -c hello.adb
gnatbind -x hello.ali
gnatlink hello.ali
ld: library not found for -lSystem
collect2: error: ld returned 1 exit status
gnatlink: error when calling /Users/powers/GNAT/bin/gcc
gnatmake: *** link failed.
Any ideas why it is failing to link?