From: earnie_boyd@yahoo.com (Earnie Boyd)
Subject: Re: mingw32 and 3rd party .dll's
26 Mar 1998 09:26:22 -0800
Message-ID: <19980325010157.2093.rocketmail.cygnus.gnu-win32@send1b.yahoomail.com>
Reply-To: earnie_boyd@hotmail.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
To: Dale Smith <dale.smith@bellhow.com>
Cc: gnu-win32@cygnus.com

Hi Dale,

Make sure that the Microsoft .lib function actually has the @4 and not
the @1.  To do this:

nm --demangle --defined-only someMSlib.lib | grep CloseDirectory

You can only do the with the MS .lib not the Borland .lib, they have
different formats or headers.  My guess is that the .def is incorrect.
 It is just a guess.

Earnie.

earnie_boyd@hotmail.com




---Dale Smith <dale.smith@bellhow.com> wrote:
>
> Greetings!
> 
> I hope this is the right place to ask mingw32 questions.  Please be
gentle!
> 
> I'm (attempting) to use mingw32 as a target.  I am using two
different host
> platforms, solaris and linux.  I am trying to link against a dll
from Equis
> International.  They have provided a .def file and headers along
with import
> .lib's for borland and Microsoft.
> 
> I'm building the mingw32 import library with:
> 
> DLLTOOL= i386--mingw32-dlltool --as i386--mingw32-as
> 
> libmsfl65.a: msfl65.def msfl65.dll
> 	$(DLLTOOL) --def msfl65.def --dllname msfl65.dll --output-lib $@
> 
> 
> The first thing that is weird was the names that gcc want's to use
and the
> names in the .def file.  For an example, the header has a prototype
like this:
> 
> #ifdef __cplusplus
>   #define MSFLFUNC extern "C"
> #else
>   #define MSFLFUNC extern
> #endif
> 
> MSFLFUNC int __stdcall MSFL1_CloseDirectory(char cDirNumber);
> 
> Gcc wants to call this MSFL1_CloseDirectory@1 while the .def file has
> MSFL1_CloseDirectory@4.  I changed the "char" to an "int" and gcc is
now
> looking for MSFL1_CloseDirectory@4.  Great.  Gcc and msc have
different ideas
> on how many bytes a char takes up on the stack.
> 
> Anyway, the program links cleanly, but can't seem to find the
function.
> 
> "The procedure entry point xxx could not be located in the dynamic
link
> library msfl65.dll"
> 
> Where xxx IS what is in the .def file.
> 
> Any takers?
> 
> Thanks!
>    Dale
> 
> 
> -- 
> Dale P. Smith
> dale.smith@bellhow.com
> Cleveland Linux Users Group: http://cleveland.lug.net/
> -
> For help on using this list (especially unsubscribing), send a
message to
> "gnu-win32-request@cygnus.com" with one line of text: "help".
> 

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
