Linking a .dll using the .lib.

Anders Norlander anorland@hem2.passagen.se
Sat Nov 28 07:51:00 GMT 1998


> 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@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list