From: Simon Wright <simon@pushface.org>
Subject: Re: Interfacing C and Ada95
Date: 21 Oct 2003 23:16:40 +0100
Date: 2003-10-21T23:16:40+01:00 [thread overview]
Message-ID: <x7v7k2ykzhz.fsf@smaug.pushface.org> (raw)
In-Reply-To: uznfumy9g.fsf@nasa.gov
Stephen Leake <Stephe.Leake@nasa.gov> writes:
> Antonio Mart�nez <amartinez@atc.ugr.es> writes:
>
> > Now, if I add the 5th line in the file
> > paquete.adb, which contains put_line("Hello"), the gcc says ...
> > paquete.o(.text+0x10): In function `sumtwo':
> >
> > : referencia a `ada__text_io__put_line__2' sin definir
> > collect2: ld devolvi� el estado de salida 1
>
> This is an installation problem; the linker can't find the gnat
> libraries.
No, it's that he's using plain gcc to link rather than gnat tools.
This works for me (after including adainit(), adafinal() as a previous
poster suggested):
smaug.pushface.org[9]$ gnatmake -c paquete
gcc -c paquete.adb
smaug.pushface.org[10]$ gnatbind -n paquete.ali
smaug.pushface.org[11]$ gnatlink paquete.ali progC.o
smaug.pushface.org[12]$ ./paquete
Hello
3 + 2 = 5
--
Simon Wright 100% Ada, no bugs.
next prev parent reply other threads:[~2003-10-21 22:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-20 23:13 Interfacing C and Ada95 Antonio Martínez
2003-10-21 2:02 ` David Marceau
2003-10-21 4:57 ` sk
2003-10-21 15:00 ` Stephen Leake
2003-10-21 22:16 ` Simon Wright [this message]
2003-10-21 16:04 ` Antonio Martínez
2003-10-21 17:26 ` sk
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox