From: "news.broadpark.no" <etjensen@broadpark.no>
Subject: undefined reference to `adainit'
Date: Sat, 16 Feb 2008 23:39:28 +0100
Date: 2008-02-16T23:39:28+01:00 [thread overview]
Message-ID: <47b765d2$1@news.broadpark.no> (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;
next reply other threads:[~2008-02-16 22:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-16 22:39 news.broadpark.no [this message]
2008-02-17 17:51 ` undefined reference to `adainit' 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
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox