[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MinGW libtool DLL failure

From: Bob Friesenhahn
Subject: Re: MinGW libtool DLL failure
Date: Thu, 10 Oct 2002 10:29:51 -0500 (CDT)

On Thu, 10 Oct 2002, Earnie Boyd wrote:

> Elizabeth Barham wrote:
> > Bob Friesenhahn <address@hidden> writes:
> >
> >
> >>g++ -shared c:/mingw/bin/../lib/gcc-lib/mingw32/2.95.3-6/../../../dllcrt2.o 
> >> .libs/Blob.o .libs/BlobRef.o .libs/CoderInfo.o .libs/Color.o 
> >>.libs/Drawable.o .libs/Exception.o .libs/Functions.o .libs/Geometry.o 
> >>.libs/Image.o .libs/ImageRef.o .libs/Montage.o .libs/Options.o 
> >>.libs/Pixels.o .libs/STL.o .libs/Thread.o .libs/TypeMetric.o  
> >>-L/usr/local/lib ../../magick/.libs/libMagick-5.dll 
> >>-Lc:/mingw/bin/../lib/gcc-lib/mingw32/2.95.3-6 
> >>-Lc:/mingw/bin/../lib/gcc-lib -L/mingw/lib/gcc-lib/mingw32/2.95.3-6 
> >>-Lc:/mingw/bin/../lib/gcc-lib/mingw32/2.95.3-6/../../../../mingw32/lib 
> >>-L/mingw/lib/gcc-lib/mingw32/2.95.3-6/../../../../mingw32/lib 
> >>-Lc:/mingw/bin/../lib/gcc-lib/mingw32/2.95.3-6/../../.. 
> >>-L/mingw/lib/gcc-lib/mingw32/2.95.3-6/../../.. -lstdc++ -luser32 -lkernel32 
> >>-ladvapi32 -lshell32 -lmingw32 -lgcc -lmoldname -lmsvcrt   -o 
> >>.libs/libMagick++-5.dll
> >
> >
> > What about removing the first object file, the:
> >
> > c:/mingw/bin/../lib/gcc-lib/mingw32/2.95.3-6/../../../dllcrt2.o
> >
> > part?
> >
> > The reason is that the multiple definitions were coming from within
> > that particular object file - what happens without it?
> >
> With the link line fully qualified with all of the system libraries and
> objects you could just use ld directly.  It would be better, IMO, though
> to remove the system libraries from the link command and allow g[cc|++]
> to add the appropriate system libraries so that if some new system
> library is added, the package won't need to worry about it.

These system libraries were added by libtool.  The g++ commandline is
formulated by libtool.  CVS libtool uses g++ because it was proven
that using the C++ compiler to link is the most portable solution.

I suspect that for MinGW, there is a mix of older libtool techniques
(obtaining crt and system libraries from the compiler) clashing with
the new approach (let the compiler do the work).

Cygwin does not have these problems so we have a working example.

Bob Friesenhahn

reply via email to

[Prev in Thread] Current Thread [Next in Thread]