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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,889b07ac9e6ac6a3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.189.197 with SMTP id gk5mr97112pbc.1.1330568785870; Wed, 29 Feb 2012 18:26:25 -0800 (PST) Path: h9ni25087pbe.0!nntp.google.com!news2.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: "Rego, P." Newsgroups: comp.lang.ada Subject: Re: Using dll from a C# code Date: Wed, 29 Feb 2012 18:26:25 -0800 (PST) Organization: http://groups.google.com Message-ID: <189548.691.1330568785536.JavaMail.geo-discussion-forums@ynlt17> References: <3622013.252.1330516368698.JavaMail.geo-discussion-forums@ynkz21> NNTP-Posting-Host: 187.34.114.252 Mime-Version: 1.0 X-Trace: posting.google.com 1330568785 26631 127.0.0.1 (1 Mar 2012 02:26:25 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 1 Mar 2012 02:26:25 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=187.34.114.252; posting-account=TRgI1QoAAABSsYi-ox3Pi6N-JEKKU0cu User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-02-29T18:26:25-08:00 List-Id: > You have to be sure you are using the compiler for .NET; I think > there's something about qualifying names too, but I don't remember > what. You may want to check out the import pragma on page 16 in this > pdf: http://www.usafa.edu/df/dfe/dfer/centers/accr/docs/carlisle2006b.pdf Quite interesting this paper. But I still could not import the function with success. Actually I changed the simple.cs to // simple.cs // compile with csc /t:library simple.cs namespace Simple{ public class VerifyClass{ public static bool Verify(){ return true; } } } So when I make gnatmake main -largs -lsimple, it returns me gcc -c main.adb gcc -c simple.ads gnatbind -x main.ali gnatlink main.ali -lsimple .\main.o:main.adb:(.text+0x21): undefined reference to `Verify@0' collect2: ld returned 1 exit status gnatlink: error when calling C:\GNAT\2011\bin\gcc.exe gnatmake: *** link failed. I sense that the problem is a tiny mistake (but where?)