Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undefined reference to `_Unwind_Resume' with QT

Tags:

c++

qt

When trying to switch to gcc 4.6.2 in qt (setting it in a toolchain) I'm getting the following error:

c:\ndk_buildrepos\qt-desktop\src\winmain\qtmain_win.cpp:93: error: undefined reference to `_Unwind_Resume'  

Any idea how to fix it?

//.pro
QMAKE_CXXFLAGS += -std=c++0x

SOURCES += \
    main.cpp
like image 575
smallB Avatar asked Jan 19 '26 23:01

smallB


2 Answers

Undefined references to _Unwind_Resume are caused by compiling with a GCC with a different stack unwinding method from that used by the library you're trying to link with.

As stated above, the solution is to rebuild the library with the same compiler. Just noting the cause for future google visitors.

like image 111
Riot Avatar answered Jan 22 '26 15:01

Riot


  1. I download and installed a Qt library alone (i didn't download the whole SDK)
  2. I Wrote a simple Hello Qt window..
  3. I link it with my Dev-Cpp (since Dev-Cpp is using MinGW as well) mine version actually is 3.4.x not 4.4.x...
  4. I compile it the Qt way using qmake .. etc..
  5. I got an error you have experienced as well..

... "_Unwind_Resume ..." ...

My Solution (simple, very simple)

  1. Run the Qt X.X.X. (Build Debug Libraries) or..
  2. Run the qtvars.bat (depending on the version of Qt you are using) mine is 4.8.0..
  3. 1 and 2 are the same thing..

I did a hit of make again.. it runs..:)

p.s. it solves my problem.:) I hope it can solve yours too.

like image 20
mike_s Avatar answered Jan 22 '26 16:01

mike_s



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!