delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/11/28/16:57:33

From: anorland AT hem2 DOT passagen DOT se (Anders Norlander)
Subject: RE: Linking a .dll using the .lib.
28 Nov 1998 16:57:33 -0800 :
Message-ID: <00a301be1ae6$75666e40$b6fc09a4.cygnus.gnu-win32@wmdata.wmdata.se>
Mime-Version: 1.0
To: "Jens Yllman" <jens DOT yllman AT uniweb DOT se>, "GNUWin32" <gnu-win32 AT cygnus DOT com>

> Hello,
>
> I'm trying to use a .lib file with ld to get access to a .dll. I get a
>few warings like the following one.
>
>/cygnus/cygwin-b20/H-i586-cygwin32/i586-cygwin32/bin/ld:
>arapi40.lib(arapi40.dll): warning: ignoring duplicate section `.idata$5'
>
> The .exe is created, but when I run the .exe I get a message saying:
>
> "The procedure entry point could not be located in the dynamic link
>library xxx.dll"
>
> Anyone here that knows how to link a .dll this way????


You should create an import library with dlltool, something like
this:
echo "EXPORS" >arapi40.def
# extract exports
`nm arapi40.lib | grep ' T ' | sed 's/........ T _//g' >>arapi40.def'
dlltool -k --def arapi40.def --dllname arapi40.dll --output-lib libarapi40.a

Anders Norlander


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019