comp.lang.ada
 help / color / mirror / Atom feed
From: "news.broadpark.no" <etjensen@broadpark.no>
Subject: Re: undefined reference to `adainit'
Date: Sun, 17 Feb 2008 20:07:11 +0100
Date: 2008-02-17T20:07:11+01:00	[thread overview]
Message-ID: <47b88598$1@news.broadpark.no> (raw)
In-Reply-To: <m24pc75v4t.fsf@mac.com>

"Simon Wright" <simon.j.wright@mac.com> wrote in message 
news:m24pc75v4t.fsf@mac.com...
> Are you trying to make a GNAT project file to (re)build the library,
> or to use the already-built library? The one you post looks like the
> former.
>
> I suspect your problem is the 'for Library_Auto_Init use
> "False";'. Why is this here?

I have a library with full source code that I will recompile. However, In 
the example I provided I have written a small DLL that I'm compiling. 
Compiling it thsi way works:

gnatmake -c api
gnatbind -n api
gnatdll -d api.dll api.ali

However, using GPS with the settings I provided does not work. Making the 
project gives the following output:

gnatmake -PI:\Temp\ADATest\AdaDLL\api.gpr -d
gnatbind -n -o b~api.adb -Lapi -a api.ali
gcc -c b~api.adb

building dynamic library for project api
C:\GNAT\2007\bin\gcc.exe -shared -o 
i:\temp\adatest\adadll\dll\api.dll -LC:/GNAT/2007/lib/gcc/pentium-mingw32msv/4.1.3/adalib/ 
i:\temp\adatest\adadll\obj\api.o 
... -L.\ -Li:\temp\adatest\adadll\obj\ -LC:/GNAT/2007/lib/gcc/pentium-mingw32msv/4.1.3/adalib/ 
 -Wl,--stack=0x2000000 -LC:/GNAT/2007/lib/gcc/pentium-mingw32msv/4.1.3/adalib/ 
 -lgnat-2007
i:\temp\adatest\adadll\obj\api.o:api.adb:(.text+0x38): undefined reference 
to `adainit'
i:\temp\adatest\adadll\obj\api.o:api.adb:(.text+0x57): undefined reference 
to `adafinal'
collect2: ld returned 1 exit status
gnatmake: gcc execution error

process exited with status 4

I have problems seeing whats wrong. I have treid different settings for 
Library_Auto_Init, but with the same result.

Eirik 




  reply	other threads:[~2008-02-17 19:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-16 22:39 undefined reference to `adainit' news.broadpark.no
2008-02-17 17:51 ` Simon Wright
2008-02-17 19:07   ` news.broadpark.no [this message]
2008-02-17 22:12     ` Simon Wright
2008-02-18  7:04 ` Martin Krischik
2008-02-18 20:44   ` news.broadpark.no
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox