Build failure with Qt makefile: undefined reference to `_Unwind_Resume’

While building NetCom’s app_gui module through command line with the makefile auto-generated by Qt, I encountered following error:

undefined reference to `_Unwind_Resume'

Just in case anyone makes the same mistake, here is the tip: makefile generated by Qt requires some environment variables to be set up beforehand.  In another word, if you run build from Qt’s command prompt, the environment will be configured for you and you are unlikely to run into this problem. If you have no option and must run the build from standard command line environment, do make sure that:

  1. Variable QTDIR is defined and pointing to Qt framework’s location, i.e. C:\Qt\2010.02.1\qt.
  2. Qt framework’s bin directory has been set in PATH variable.
  3. MinGW’s bin directory has been set in PATH variable.

Take note that I made the build for Win32 and used MinGW as toolchain. I am not very sure if step #3 is related to this error message, yet in my case it is essential in order to make success build. I have not try this for Linux yet as I just messed up my Linux environment. Once tested on Linux will share the result here.

— Updated 2010-05-09 —
Tested on Kubuntu 10.04, and able to build app_gui from command line with step #1 and #2 prepared :)

Comments are closed.