comp.lang.ada
 help / color / mirror / Atom feed
From: Szymon Guz <guzo@stud.ics.p.lodz.pl>
Subject: Re: Bindings for DLL with GNAT
Date: Thu, 25 Mar 2004 20:30:54 +0100
Date: 2004-03-25T20:30:54+01:00	[thread overview]
Message-ID: <c3vc29$m18$1@atlantis.news.tpi.pl> (raw)
In-Reply-To: <Xns94B58E7672AA7BerndSpechtgmxcom@151.189.20.10>

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



      reply	other threads:[~2004-03-25 19:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-25 12:59 Bindings for DLL with GNAT Bernd Specht
2004-03-25 19:30 ` Szymon Guz [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox