This is the mail archive of the mailing list for the binutils 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: [Patch/pe-coff] : Add native spelling of import lib names to dynamic lib search

Ross Ridge wrote

> Danny Smith wrote:
> >However, the native naming convention for these import libs is
> >and gld_i386pe_open_dynamic_archive does not currently recognize this
> >name format. This means that doing something like -L/path/to/sdk
> >could link directly to "foo32.dll", rather than find the import lib
> >"foo32.lib". 
> Umm... doing something like -L/path/to/sdk -lfoo32 already works for
> me with ld.  Am I missing something here?

It finds foo32.lib after unsuccesfully going through the dynamic lib
search list, then trying to find a static lib name libfoo32.a  and
finally trying the .lib spelling in

If 'foo32.dll' is found before the import lib, 'foo32.lib', ld will
attempt direct linking to foo32.dll. This will fail if, as in platform
sdk, the symbols are exported only by aliased name.

Now  I  realize that putting a DLL in a library search path is not the
best thing to do, but it happens.

It often happens when building/testing a project and the makefile puts
the new dll and the import lib in the same  directory.

See this:

I didn't like the answer given by the cygwin respondents.  The patch was
an alternative answer.


> 					Ross Ridge

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