mingw32 g++ is unable to create DLLs

Bug #600615 reported by John Cupitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mingw32 (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: mingw32

I have a C++ DLL which uses stdc++ features. Mingw32 on Ubuntu lucid is unable to link this. Compilation fails with:

libtool: link: /usr/bin/i586-mingw32msvc-g++ -shared -nostdlib /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib/dllcrt2.o /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/crtbegin.o .libs/VImage.o .libs/VError.o .libs/VDisplay.o .libs/VMask.o -L/home/john/windows/win/lib ../libvips/.libs/libvips.dll.a -lMagickWand -lMagickCore -lpng12 -ltiff -lz -ljpeg -lgthread-2.0 -lxml2 -lpangoft2-1.0 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -lfftw3 -llcms -lexif -L/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj -L/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/lib -lstdc++ -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt /usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/crtend.o -mno-cygwin -mms-bitfields -march=i686 -Wl,--enable-auto-import -mno-cygwin -mms-bitfields -march=i686 -mno-cygwin -o .libs/libvipsCC-15.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libvipsCC.dll.a
Creating library file: .libs/libvipsCC.dll.a
.libs/VError.o:VError.cc:(.text+0x21): undefined reference to `__imp___ZNSt8ios_base4InitC1Ev'
[... snip ... more undefined references follow, about half are errors linking to ios init, half to exception init]

It builds C DLLs correctly.

If I make my own mingw32 cross-compiler following the instructions at http://www.mingw.org/wiki/LinuxCrossMinGW everything works perfectly.

This process also worked well in karmic. It seems to be only the lucid package which has this problem.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: mingw32 (not installed)
ProcVersionSignature: Ubuntu 2.6.32-23.37-generic 2.6.32.15+drm33.5
Uname: Linux 2.6.32-23-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Thu Jul 1 12:53:12 2010
ProcEnviron:
 PATH=(custom, user)
 LANG=en_GB.utf8
 SHELL=/bin/bash
SourcePackage: mingw32

Revision history for this message
John Cupitt (jcupitt) wrote :

I just tried on 10.10 and the mingw32 there works fine, so I guess this bug can be closed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.