Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Ada > undefined refer...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 6 Topic 5553 of 5966
Post > Topic >>

undefined reference to `adainit'

by "news.broadpark.no" <etjensen@[EMAIL PROTECTED] > Feb 16, 2008 at 11:39 PM

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;
 




 6 Posts in Topic:
undefined reference to `adainit'
"news.broadpark.no&q  2008-02-16 23:39:28 
Re: undefined reference to `adainit'
Simon Wright <simon.j.  2008-02-17 17:51:30 
Re: undefined reference to `adainit'
"news.broadpark.no&q  2008-02-17 20:07:11 
Re: undefined reference to `adainit'
Simon Wright <simon.j.  2008-02-17 22:12:35 
Re: undefined reference to `adainit'
Martin Krischik <krisc  2008-02-18 08:04:47 
Re: undefined reference to `adainit'
"news.broadpark.no&q  2008-02-18 21:44:24 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Nov 21 23:26:10 CST 2008.