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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3c728f4a9a349f1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-25 11:31:12 PST Path: archiver1.google.com!news1.google.com!news.glorb.com!news.cs.univ-paris8.fr!proxad.net!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail From: Szymon Guz Newsgroups: comp.lang.ada Subject: Re: Bindings for DLL with GNAT Date: Thu, 25 Mar 2004 20:30:54 +0100 Organization: tp.internet - http://www.tpi.pl/ Message-ID: References: NNTP-Posting-Host: hal.skynet.org.pl Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: atlantis.news.tpi.pl 1080243091 22568 195.116.185.50 (25 Mar 2004 19:31:31 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: Thu, 25 Mar 2004 19:31:31 +0000 (UTC) User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: en-us, en In-Reply-To: Xref: archiver1.google.com comp.lang.ada:6520 Date: 2004-03-25T20:30:54+01:00 List-Id: Bernd Specht wrote: > Hello, > > I've some trouble with generating bindings for a dll (GNAT on Win2k). > > I've written a spec containing the definitions and added: > pragma import (stdcall, XY, "XY"); > > Then I generated a import-library as described in gnat_ug. > > When linking, the linker tells me, it miss a "XY@8". So I added the "@8" in > the ".def"-file. Then link works, but at runtime I get a message "XY@8" not > found in dll. > > In fact, the name in the DLL is without "@8" (but the linker expects it). > > Any ideas? > > Regards, > Bernd AFAIK the problem is that during compilation GNAT changes the sign '@' into '__0040' or sth like that. You have to change it in the file that you get when you compile the Ada file in which you have this pragma Import. Szymon Guz