I created a default Gui project (mo modifications whatsoever) and, using Creator, confirmed that it compiled and linked. (Dynamic linkage to QT libs).
I then opened a cmd prompt. Set my environmental variables to the various Qt bin dirs, then ran qmake and mingw. I get an odd linker error.
I've checked other posts with this problem and in their cases it turned out to me a mingw version problem. In my case I only have the mingw that was installed by QT Creator.
The error is below.
Do you have any idea why the cmd line compile fails in my case?
C:\test\test>mingw32-make.exe -v
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-pc-mingw32
C:\test\test>gcc -v
Using built-in specs.
Target: i686-w64-mingw32
Configured with: ../gcc44-svn/configure --target=i686-w64-mingw32 --host=i686-w64-mingw32 --disable-multilib --disable-nls --disable-win32-registry --prefix=/mi
ngw32 --with-gmp=/mingw32 --with-mpfr=/mingw32 --enable-languages=c,c++
Thread model: win32
gcc version 4.4.3 (GCC)
C:\test\test>qmake.exe test.pro -r -spec win32-g++ CONFIG+=release
C:\test\test>mingw32-make.exe -w
mingw32-make.exe: Entering directory `C:/test/test'
mingw32-make.exe -f Makefile.Release
mingw32-make.exe[1]: Entering directory `C:/test/test'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -o release\test.exe release/main.
o release/mainwindow.o release/moc_mainwindow.o -L"c:\Qt\2010.04\qt\lib" -lmingw32 -lqtmain -lQtGui4 -lQtCore4
c:\Qt\2010.04\qt\lib/libqtmain.a(qtmain_win.o):qtmain_win.cpp:(.text+0x1c2): undefined reference to `_Unwind_Resume'
c:\Qt\2010.04\qt\lib/libqtmain.a(qtmain_win.o):qtmain_win.cpp:(.text$_ZN7QVectorIPcE7reallocEii[QVector<char*>::realloc(int, int)]+0x187): undefined reference t
o `_Unwind_Resume'
c:\Qt\2010.04\qt\lib/libqtmain.a(qtmain_win.o):qtmain_win.cpp:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
mingw32-make.exe[1]: *** [release\test.exe] Error 1
mingw32-make.exe[1]: Leaving directory `C:/test/test'
mingw32-make.exe: *** [release] Error 2
mingw32-make.exe: Leaving directory `C:/test/test'
C:\test\test>mingw32-make.exe -v
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-pc-mingw32
C:\test\test>gcc -v
Using built-in specs.
Target: i686-w64-mingw32
Configured with: ../gcc44-svn/configure --target=i686-w64-mingw32 --host=i686-w64-mingw32 --disable-multilib --disable-nls --disable-win32-registry --prefix=/mi
ngw32 --with-gmp=/mingw32 --with-mpfr=/mingw32 --enable-languages=c,c++
Thread model: win32
gcc version 4.4.3 (GCC)
C:\test\test>qmake.exe test.pro -r -spec win32-g++ CONFIG+=release
C:\test\test>mingw32-make.exe -w
mingw32-make.exe: Entering directory `C:/test/test'
mingw32-make.exe -f Makefile.Release
mingw32-make.exe[1]: Entering directory `C:/test/test'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -o release\test.exe release/main.
o release/mainwindow.o release/moc_mainwindow.o -L"c:\Qt\2010.04\qt\lib" -lmingw32 -lqtmain -lQtGui4 -lQtCore4
c:\Qt\2010.04\qt\lib/libqtmain.a(qtmain_win.o):qtmain_win.cpp:(.text+0x1c2): undefined reference to `_Unwind_Resume'
c:\Qt\2010.04\qt\lib/libqtmain.a(qtmain_win.o):qtmain_win.cpp:(.text$_ZN7QVectorIPcE7reallocEii[QVector<char*>::realloc(int, int)]+0x187): undefined reference t
o `_Unwind_Resume'
c:\Qt\2010.04\qt\lib/libqtmain.a(qtmain_win.o):qtmain_win.cpp:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
mingw32-make.exe[1]: *** [release\test.exe] Error 1
mingw32-make.exe[1]: Leaving directory `C:/test/test'
mingw32-make.exe: *** [release] Error 2
mingw32-make.exe: Leaving directory `C:/test/test'
To copy to clipboard, switch view to plain text mode
My QT related path variables are:
C:\Qt\2010.04\mingw\bin\
C:\Qt\2010.04\qt\mkspecs\
C:\Qt\2010.04\qt\bin\
Bookmarks