comp.lang.ada
 help / color / mirror / Atom feed
* undefined reference to `adainit'
@ 2008-02-16 22:39 news.broadpark.no
  2008-02-17 17:51 ` Simon Wright
  2008-02-18  7:04 ` Martin Krischik
  0 siblings, 2 replies; 6+ messages in thread
From: news.broadpark.no @ 2008-02-16 22:39 UTC (permalink / raw)


I must admit that I'm not very experienced with Ada. I'm working with an 
interface since I need to be able to call a library written in Ada from 
.NET. I made a small project and compiled it as follows:

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

Now, everything works fine. I'm able to call the library from a C# .NET 
program. However, if I create a GPS project file an try to compile, I get 
the following error:

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'
gnatmake: gcc execution error

Does anyone know what to do? The GPS project file look like this:

project Api is

   for Library_Name use "api";
   for Library_Dir use "dll";
   for Library_Ali_Dir use "ali";
   for Library_Kind use "dynamic";
   for Languages use ("Ada");
   for Object_Dir use "obj";
   for Library_Interface use ("API");
   for Library_Auto_Init use "False";
   for Library_Src_Dir use "dll";

   package Compiler is
      for Default_Switches ("Ada") use ("-gnat95", "-gnatv", "-lgnat");
   end Compiler;

   package Linker is
      for Linker_Options use ("-lgnat");
   end Linker;

end Api; 




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-02-18 20:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2008-02-17 22:12     ` Simon Wright
2008-02-18  7:04 ` Martin Krischik
2008-02-18 20:44   ` news.broadpark.no

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