From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,STOX_REPLY_TYPE autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6c0fedd136c7b307 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "news.broadpark.no" Newsgroups: comp.lang.ada References: <47b765d2$1@news.broadpark.no> In-Reply-To: Subject: Re: undefined reference to `adainit' Date: Sun, 17 Feb 2008 20:07:11 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6001.18000 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18000 NNTP-Posting-Host: 150.80-202-137.nextgentel.com X-Original-NNTP-Posting-Host: 150.80-202-137.nextgentel.com Message-ID: <47b88598$1@news.broadpark.no> X-Trace: news.broadpark.no 1203275160 80.202.137.150 (17 Feb 2008 20:06:00 +0100) Path: g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!nntp.gblx.net!nntp3.phx1!news.broadpark.no!not-for-mail Xref: g2news1.google.com comp.lang.ada:19839 Date: 2008-02-17T20:07:11+01:00 List-Id: "Simon Wright" 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