I have never reported a bug before. Can you provide some guidance on the
prescribed procedure to do this lest I get unmercifully flamed for doing
Roger Wells, P.E.
221 Third St
Newport, RI 02840
Danny Smith <dannysmith@...>
Sent by: mingw-users-admin@...
12/01/2004 02:09 PM
Please respond to mingw-users
Subject: Re: [Mingw-users] linking: 2.95.2 vs 3.3.1
WELLS, ROGER K. wrote:
> BTW thanks for the response.
> our library (libutility.dll under GCC3.3.1, utility.dll +
> libutility.a, an import library created with dlltool, etc, under GCC
> 2.95.2) contains functions open, close, read and write. Functions
> with the same names, prototypes, and generally the same purpose are
> also contained in msvcrt.dll and are prototyped in io.h.
> When an application, say foo.exe that uses open, close, read, and/or
> write, is built the build script will (after compiling the sources)
> issue the following link command:
> gcc -ofoo foo.o -lutility
> under GCC 2.95.2 the references to open etc. will be resolved into
> utility.dll (objdump -p foo.exe will show this to be true)
> under GCC 3.3.1 the same references will be resolved into msvcrt.dll
I remember now, somebody has reported this bug in direct-link-to-dll
functionality before, but I can't find the post now.
OK, when using, direct-link-to-dll, the command-line search order is
not honoured. When linking directly to a dll, ld generates an
import-lib (actually a bfd representation of an import lib) on-the-fly.
That synthesized "lib" does not replace your command line libname, but,
IIRC, is appended to the end. Hence the behaviour you've observed.
You may wish to report this to binutils list so that the bug report is
not lost again.
The only immedaite solution I can see is to generate an explicit import
lib yourself, and use it.
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
MinGW-users mailing list
You may change your MinGW Account Options or unsubscribe at: