comp.lang.ada
 help / color / mirror / Atom feed
From: michael bode <michael.bode@laserline.de>
Subject: Re: MinGW GNAT 3.4.4 linking problem
Date: 14 Oct 2005 14:56:33 +0200
Date: 2005-10-14T14:56:33+02:00	[thread overview]
Message-ID: <dio9u3$8nb$1@online.de> (raw)
In-Reply-To: dio063$r9c$1@online.de

michael bode <michael.bode@laserline.de> writes:

> The library uses StdCall conventions and I have the .dll and .lib
> compiled with Microsoft VC98. Interestingly everything work fine with
> GNAT 3.15p. When I change the PATH to point to C:\MINGW\bin instead
> C:\GNAT\bin -> 'undefined symbol'.

Problem solved. The library exports names of the form '_function@N'
which is as I've learned typical for a MSVC .dll created with
__declspec(dllexport). Somehow gnat 3.4.4 expects names of the form
'function@N' without leading underscore. Proper solution: use
dll-tools and DEF files to mangle the names into 'function@N'
form. Simple solution: pragma Import (StdCall, function, "_function")

GNAT 3.15p is quite happy with pragma Import (StdCall, function,
"function"). Is that a well known change?



      reply	other threads:[~2005-10-14 12:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-14 10:10 MinGW GNAT 3.4.4 linking problem michael bode
2005-10-14 12:56 ` michael bode [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