6

I am looking for a command line to check for the version of my Ada installation. Any help ?

Arkapravo
  • 4,084
  • 9
  • 37
  • 46

2 Answers2

5

Since you listed gcc as your compiler this gcc -x Ada --version should work.

Alternatively, if you're using GNAT, gnat compile --version should work. This command should give you the version of GNATMAKE.

nbro
  • 15,395
  • 32
  • 113
  • 196
Shark8
  • 4,095
  • 1
  • 17
  • 31
  • 2
    I'm not sure what the default language version is for gnat 4.4.1 (I use GNAT GPL, where it's still Ada 95). To ensure a particular language version, use the -gnat95 or -gnat05 switches. (Or -gnat83 if you're working with old code, or, if you're feeling frisky, you can try out -gnat12). – Marc C Feb 12 '11 at 15:37
  • @Marc C : Got that ! .... -gnat05 Ada 2005 mode (default) :-) ... thanks for gnat12 - did not know about that one ! – Arkapravo Feb 14 '11 at 04:39
  • "gnatmake --version" If you want your version of gnatmake, should match up with the answer provided by Shark8. – NWS Feb 15 '11 at 12:09
  • 1
    The "which compiler is this" command that I was told by AdaCore is "gnatls -v". This also tells you the compiler search paths. The end of the "gnatmake -v" output tells you what language versions are supported and which is the default. – Simon Wright Feb 17 '11 at 14:34
  • None of these work on my CentOS 5.6 machine except `gnatls -v`. I only get the GCC version otherwise. – Keith M Dec 16 '16 at 00:16
5

Recommended way is: gnatls -v, output would be like this:

GNATLS Pro 6.3.1 (20100111-43)

or:

GNATLS GPL 2010 (20100603)

to get version relations between Pro, GPL and GCC, see here.

Benjamin
  • 11,560
  • 13
  • 70
  • 119
Rommudoh
  • 1,844
  • 10
  • 11