Install GNAT (GNU New York University Ada Translator):
Code:
sudo apt-get install gnat
Here is the hello.adb
with Ada.Text_IO; procedure Hello is begin Ada.Text_IO.Put_Line("Hello, world!"); end Hello;
And use this command to compile:
$ gnat make hello.adb
You will get hello.ali and a binary hello in your home directory.
Alternately you can split the steps
1. Run gcc to compile to object file:
Code:
gcc -c hello.adb
2. Run gnatbind to produce binder output:
gnatbind hello.ali
3. Run gnatlink to link and produce executable output:
gnatlink hello
No comments:
Post a Comment