This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Linking a .dll using the .lib.


> 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".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]