This is the mail archive of the cygwin 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]
Other format: [Raw text]

Re: Find dll name corresponding to an import library


On 11/6/2013 15:31, Jean-Pierre Flori wrote:

Is there a canonical way to do so?

The canonical way is to name your import libraries so that the name of the corresponding DLL is obvious.

Non-Cygwin import libraries are traditionally named after the DLL: foo.lib is for foo.dll.

Cygwin's stock build system is a bit different, due to POSIX naming norms, but the transform is simple: libfoo.a is for cygfoo.dll.

If you have an import library with a name that doesn't conform to one of these schemes, you might be able to dig the DLL name out of the library file. Through some futzing around, I've discovered that this works:

    $ objdump -s foo.a | grep cyg.*dll$

That assumes that the DLL uses the "cyg" prefix. Just grepping for "dll$" would be a better option if you weren't sure about even that.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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