Skip to content

Instantly share code, notes, and snippets.

@Keith-S-Thompson
Created November 8, 2012 22:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Keith-S-Thompson/4042215 to your computer and use it in GitHub Desktop.
Save Keith-S-Thompson/4042215 to your computer and use it in GitHub Desktop.
gnatmake on Ubuntu
hello
hello.ali
hello.o
with Ada.Text_IO; use Ada.Text_IO;
procedure Hello is
begin
Put_Line("Hello, world\n");
end Hello;
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="12.10, Quantal Quetzal"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu quantal (12.10)"
VERSION_ID="12.10"
$ cat hello.adb
with Ada.Text_IO; use Ada.Text_IO;
procedure Hello is
begin
Put_Line("Hello, world\n");
end Hello;
$ git add hello.adb
$ dpkg -l | grep gnat
ii gnat 4.6ubuntu1 i386 GNU Ada compiler
ii gnat-4.6 4.6.3-4ubuntu1 i386 GNU Ada compiler
ii gnat-4.6-base 4.6.3-4ubuntu1 i386 GNU Ada compiler (common files)
ii gnat-4.6-doc 4.6.3-4ubuntu1 all GNU Ada compiler (documentation)
ii gnat-doc 4.6ubuntu1 all Documentation for the GNU Ada compiler
ii gnat-gps 5.0-13 i386 integrated development environment for C and Ada
ii gnat-gps-common 5.0-13 all integrated development environment for C and Ada (common files)
ii gnat-gps-doc 5.0-13 all integrated development environment for C and Ada (documentation)
ii gpgv 1.4.11-3ubuntu4 i386 GNU privacy guard - signature verification tool
ii libgnat-4.6:i386 4.6.3-4ubuntu1 i386 runtime for applications compiled with GNAT (shared library)
ii libgnatprj4.6:i386 4.6.3-4ubuntu1 i386 GNU Ada compiler Project Manager (shared library)
ii libgnatvsn4.6:i386 4.6.3-4ubuntu1 i386 GNU Ada compiler selected components (shared library)
$ gnatmake -v hello
GNATMAKE 4.6
Copyright (C) 1995-2010, Free Software Foundation, Inc.
"hello.ali" being checked ...
-> "hello.ali" missing.
gcc-4.6 -c hello.adb
End of compilation
gnatbind -x hello.ali
gnatlink hello.ali
$ ./hello
Hello, world\n
$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment