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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b6a73acdaa835ee5,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.232.169 with SMTP id tp9mr26302132pbc.6.1332939931039; Wed, 28 Mar 2012 06:05:31 -0700 (PDT) Path: z9ni11348pbe.0!nntp.google.com!news2.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?J=E9r=F4me_Haguet?= Newsgroups: comp.lang.ada Subject: Building DLL with GNAT to be used with non-Ada application on Windows : some doubts Date: Wed, 28 Mar 2012 06:05:30 -0700 (PDT) Organization: http://groups.google.com Message-ID: <6181087.58.1332939930643.JavaMail.geo-discussion-forums@vbla14> NNTP-Posting-Host: 84.96.81.228 Mime-Version: 1.0 X-Trace: posting.google.com 1332939930 32246 127.0.0.1 (28 Mar 2012 13:05:30 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 28 Mar 2012 13:05:30 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=84.96.81.228; posting-account=d5j2DQoAAABeZhUIl30hw1xF6LEcGIMa User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-03-28T06:05:30-07:00 List-Id: Hello=20 My configuration : GNAT GPL 2011 / Windows 7 Some years ago, I had built a DLL with gnat. As it was supposed to be used with non-Ada application, I had to export and= call an initialization routine. As detailed in =A7G.11 Gnat UG. This was done with a simple makefile, calling gnatmake then gnatdll. This process is still working with Gnat GPL 2011. Now, I am trying to do the same with a gpr file. I am able to build a DLL to be used with Ada application (in this case usin= g GNAT shared runtime) As detailed in $G.10 in Gnat UG. But I am not able to build a DLL exporting its own initialization routine. When building the library, the linker fails with following message:=20 my_ada_lib.o:my_ada_lib.adb:(.text+0x77): undefined reference to `adainit' my_ada_lib.o:my_ada_lib.adb:(.text+0x87): undefined reference to `adafinal' Is it possible or not ?=20 If yes, what is the setting I have omitted ?=20 My gpr :=20 library project my_ada_lib is for Languages use ("Ada"); for Library_Name use "my_ada_lib"; for Library_Kind use "dynamic"; for Source_Dirs use ("."); for Object_Dir use "obj"; for Library_Dir use ".."; end my_ada_lib;