ceclauson
July 16th, 2008, 09:33 AM
Hello.
I'm trying to compile Ada with gcc. Here's the program, a simple "hello, world":
with Ada.Text_IO;
procedure Hello is
begin
Ada.Text_IO.Put_Line("Hello, world!");
end Hello;
When I try
gcc hello.adb on the command line, I get the following message:
gcc: -c or -S required for Ada
If I use the -S switch, I get assembly, and if I use the -o switch, I get an object file. I can't link the object file, because it contains these symbols (nm hello.o) that the linker can't resolve:
00000000 r C.0.390
U __gnat_eh_personality
00000000 T _ada_hello
U ada__text_io__put_line__2
Does anyone know how to compile an Ada program, or what objects or libraries I could use to link the object outputs against?
Thanks,
Cooper
I'm trying to compile Ada with gcc. Here's the program, a simple "hello, world":
with Ada.Text_IO;
procedure Hello is
begin
Ada.Text_IO.Put_Line("Hello, world!");
end Hello;
When I try
gcc hello.adb on the command line, I get the following message:
gcc: -c or -S required for Ada
If I use the -S switch, I get assembly, and if I use the -o switch, I get an object file. I can't link the object file, because it contains these symbols (nm hello.o) that the linker can't resolve:
00000000 r C.0.390
U __gnat_eh_personality
00000000 T _ada_hello
U ada__text_io__put_line__2
Does anyone know how to compile an Ada program, or what objects or libraries I could use to link the object outputs against?
Thanks,
Cooper