* RE: Problem compiling simple Ada program
@ 2005-06-29 20:11 Michael Swanson
2005-06-29 20:20 ` Duncan Sands
0 siblings, 1 reply; 2+ messages in thread
From: Michael Swanson @ 2005-06-29 20:11 UTC (permalink / raw)
To: gcc-help
I am trying to compile and link a simple Ada program on Cygwin. The
code for this looks like:
Hello.adb:
with Text_IO;
Procedure Hello is
begin
Text_IO.Put_Line("Hello");
end;
This compiles fine, but when I try to link the hello.o file, I get this
error:
hello.o:hello.adb:(.text+0x18): undefined reference to
'_ada__text_io__put_line__2'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libcygwin.a(libvmain.o)::
undefined reference to '_WinMain@16'
collect2: ld returned 1 exit status
This looks like I don't have the right libraries for Ada, but I have
installed the entire Devel and Lib group in Cygwin. Is there a simple
solution to this? Thanks ahead of time for any help you can give me.
Mike Swanson
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Problem compiling simple Ada program
2005-06-29 20:11 Problem compiling simple Ada program Michael Swanson
@ 2005-06-29 20:20 ` Duncan Sands
0 siblings, 0 replies; 2+ messages in thread
From: Duncan Sands @ 2005-06-29 20:20 UTC (permalink / raw)
To: gcc-help; +Cc: Michael Swanson
> This compiles fine, but when I try to link the hello.o file, I get this
> error:
> hello.o:hello.adb:(.text+0x18): undefined reference to
> '_ada__text_io__put_line__2'
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libcygwin.a(libvmain.o)::
> undefined reference to '_WinMain@16'
> collect2: ld returned 1 exit status
Are you linking using gnatlink?
Ciao,
Duncan.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-06-29 20:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-29 20:11 Problem compiling simple Ada program Michael Swanson
2005-06-29 20:20 ` Duncan Sands
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).