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: Trouble linking against vendor supplied DLL.


List:

Thank you for your responses.  However the scope of my difficulty is
somewhat different than most of you assume.  I do not have source code. 
I am not trying to create a dll.  Should I need to create a dll, I'm
certain that the suggestions I've received would work extremely well.  I
know this because I tried it and it worked successfully.

I think I've isolated my problem to the creation of the .def file.

There are two methods discussed.  The first uses nm --extern-only
--defined-only, followed by a series of sed's and fgreps.  The file so
produced contains all of the function names from the dll.  However when
this file is fed into dlltool, dlltool reports a syntax error on the
second, blank, line.

If I use dlltool with --export-all --output-def, the only entry in the
.def file is the dll start address.  Linking with the resulting export
library results in every dll function being reported as an "unresolved
reference."

If I had to guess, I'd wager that the nm etc method is producing a
"mostly correct" file which is being botched by a clumsy sed script,
probably caused by a typing error on my part, and that there was
something wrong with how I was invoking dlltool.

Summary:

I Have:
A. Universe.dll -- dynamic link library supplied by the hardware vendor.

I need to create:
B. libuniverse.a -- Cygwin compatible export library.

If someone knows how to get from A to B, I'd appreciate knowing.  All
the examples I've found seem to be working under the assumption that I
have source code from which I want to create a dll and an export
library.  I only need to create the export library from the dll.


Charles

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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