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=0.3 required=5.0 tests=BAYES_00,STOX_REPLY_TYPE, STOX_REPLY_TYPE_WITHOUT_QUOTES,XPRIO autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6c0fedd136c7b307,start X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "news.broadpark.no" Newsgroups: comp.lang.ada Subject: undefined reference to `adainit' Date: Sat, 16 Feb 2008 23:39:28 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6000.16480 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16545 NNTP-Posting-Host: 150.80-202-137.nextgentel.com X-Original-NNTP-Posting-Host: 150.80-202-137.nextgentel.com Message-ID: <47b765d2$1@news.broadpark.no> X-Trace: news.broadpark.no 1203201490 80.202.137.150 (16 Feb 2008 23:38:10 +0100) Path: g2news1.google.com!news4.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!solnet.ch!solnet.ch!nntp.gblx.net!nntp3.phx1!news.broadpark.no!not-for-mail Xref: g2news1.google.com comp.lang.ada:19832 Date: 2008-02-16T23:39:28+01:00 List-Id: 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;