You are not logged in.

1

Saturday, April 24th 2010, 9:28am

Error when compiling in Windows: "undefined reference to '__gxx_personality_v0'"

Hi folks,

I have made a Qt application in Linux (Ubuntu), in which it compiles flawlessly, and I am now trying to compile it in Windows so I can distribute it to my friends.
I have installed the required tool-chain in Windows (MinGW GCC 4.4.0, qmake, etc.) but when I try to compile I get this message:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
c:\Qt\2010.02.1\qt\lib/libqtmaind.a(qtmain_win.o): In function `WinMain@16':
C:\qt-greenhouse\Trolltech\Code_less_create_more\Trolltech\Code_less_create_more
\Troll\4.6\qt\src\winmain/qtmain_win.cpp:93: undefined reference to `_Unwind_Res
ume'
C:\qt-greenhouse\Trolltech\Code_less_create_more\Trolltech\Code_less_create_more
\Troll\4.6\qt\src\winmain/qtmain_win.cpp:135: undefined reference to `_Unwind_Re
sume'
c:\Qt\2010.02.1\qt\lib/libqtmaind.a(qtmain_win.o):../../include/QtCore/../../src
/corelib/tools/qvector.h:482: undefined reference to `_Unwind_Resume'
c:\Qt\2010.02.1\qt\lib/libqtmaind.a(qtmain_win.o):../../include/QtCore/../../src
/corelib/tools/qvector.h:483: undefined reference to `_Unwind_Resume'
c:\Qt\2010.02.1\qt\lib/libqtmaind.a(qtmain_win.o):qtmain_win.cpp:(.eh_frame+0x12
): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\pokemixer.exe] Error 1
mingw32-make[1]: Leaving directory `E:/dev/pokemixer'
mingw32-make: *** [debug] Error 2


Any clues to what is wrong here?

Thanks in advance, Kapdoloro

2

Saturday, April 24th 2010, 1:31pm

you probably do not link with C++ library

3

Saturday, April 24th 2010, 2:56pm

How do I link with that library? Do I add something to the makefile?

EDIT:
I tried to cross-compile from Linux and got the same messages ;( (also tried through WINE, same result). I didn't really expect it to work (as most of my experience with Linux/programming is failure), but I was hoping that I had finally found me a decent multi-platform GUI SDK to develop with. Please prove to me it is ^^

This post has been edited 1 times, last edit by "Kapdoloro" (Apr 24th 2010, 11:08pm)


nisavid

Beginner

  • "nisavid" is male

Posts: 27

Location: Brighton, MA, USA

Occupation: Software Developer

  • Send private message

4

Monday, April 26th 2010, 3:41pm

You are probably trying to build your application using a different compiler/linker than that which was used to build Qt. Try using the MinGW which is included with the Qt installer (if using pre-compiled binaries of Qt), or try rebuilding Qt from source using the same toolchain which you plan to use to compile your application. See my (probably) related bug report in TDM's GCC/MinGW bug tracker here.

5

Monday, April 26th 2010, 4:54pm

You were right, nisavid:
There was another GCC installment on my hard drive with a higher %PATH% priority than the version the Qt SDK installed. I removed the previous version from %PATH%, and now it works wonders :)

6

Thursday, December 2nd 2010, 8:29am

Hi everbody,

Have the same error like on the top on page and my compiler is still not able to compile.
I already have following in my system (Win Xp 32-bit SP3):

MinGW installed and located :
C:\local\MinGW
gcc -v : 3.4.5
and I'm sure that is the only version installed cause I did not intall MingGW together with QT.

added to PATH environment:
;C:\local\MinGW\bin;C:\Qt\2010.05\qt\bin;C:\Qt\2010.05\bin

I cannot compile simple application from tutorial cause have the errors from the top of the page:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
c:\Qt\2010.05\qt\lib/libqtmaind.a(qtmain_win.o): In function `WinMain@16':
C:\qt-greenhouse\Trolltech\Code_less_create_more\Trolltech\Code_less_create_more
\Troll\4.6\qt\src\winmain/qtmain_win.cpp:93: undefined reference to `_Unwind_Res
ume'
C:\qt-greenhouse\Trolltech\Code_less_create_more\Trolltech\Code_less_create_more
\Troll\4.6\qt\src\winmain/qtmain_win.cpp:135: undefined reference to `_Unwind_Re
sume'
c:\Qt\2010.05\qt\lib/libqtmaind.a(qtmain_win.o):../../include/QtCore/../../src
/corelib/tools/qvector.h:482: undefined reference to `_Unwind_Resume'
c:\Qt\2010.05\qt\lib/libqtmaind.a(qtmain_win.o):../../include/QtCore/../../src
/corelib/tools/qvector.h:483: undefined reference to `_Unwind_Resume'
c:\Qt\2010.05\qt\lib/libqtmaind.a(qtmain_win.o):qtmain_win.cpp:(.eh_frame+0x12
): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\myqtapp.exe] Error 1
mingw32-make[1]: Leaving directory `C:\local\workspace\my_first_qt_app'
mingw32-make: *** [debug] Error 2


Anyone can help?