Thread: Ada Packages
View Single Post
  #5 (permalink)  
Old 09-17-2011, 07:42 AM
Simon Wright
Guest
 
Posts: n/a
Default Re: Ada Packages

Georg Maubach <ada_resources@gmx.de> writes:

> gcc-4.3 -c basic_num_io.ads
> cannot generate code for file basic_num_io.ads (package spec)


As someone above pointed out, GNAT won't generate object code from a
spec (unless the spec doesn't need, ie must not have) a body. Try
compiling the .adb file.

-gnatc is "Check syntax and semantics only (no code generation)". I
found this out using the command "gnatmake -h".

You're better off using gnatmake as the compiler driver, it understands
all about dependencies and the Ada bind/link process, and will produce
executables if it can.
Reply With Quote