Jérôme Haguet
unread,Mar 28, 2012, 9:05:30 AM3/28/12You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hello
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 §G.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 using 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:
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 ?
If yes, what is the setting I have omitted ?
My gpr :
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;