Reputation: 91
I'm trying to link a Qt application with its libraries and the linker (MinGW) spews hundreds of lines like the following, and I am unsure how to proceed.
cpp: undefined reference to `_Unwind_SjLj_Register' c:/qt/lib/libQtCore.a(qcoreapplication_win.o)(.text+0x29d):qcoreapplication_win. cpp: undefined reference to `_Unwind_SjLj_Unregister' c:/qt/lib/libQtCore.a(qcoreapplication_win.o)(.text+0x38c):qcoreapplication_win. cpp: undefined reference to `_Unwind_SjLj_Resume' c:/qt/lib/libQtCore.a(qcoreapplication_win.o)(.text+0x4ce):qcoreapplication_win. cpp: undefined reference to `_Unwind_SjLj_Register' c:/qt/lib/libQtCore.a(qcoreapplication_win.o)(.text+0x53e):qcoreapplication_win. cpp: undefined reference to `_Unwind_SjLj_Unregister' c:/qt/lib/libQtCore.a(qcoreapplication_win.o)(.text+0x635):qcoreapplication_win. cpp: undefined reference to `_Unwind_SjLj_Resume'
Upvotes: 6
Views: 2311
Reputation: 14251
2 possible reasons that i know of:
-lstdc++
flag to the end of the compile commandUpvotes: 0
Reputation: 3809
I don't know... but to me, spewing stuff about Unwind suggests that you have a mismatch between whether the library is compiled with exceptions and your application is compiled with exceptions.
If you want exceptions, make sure you have enabled them by adding the following line in your qmake file:
CONFIG += exceptions
or, if you do not want exceptions, use the opposite
CONFIG -= exceptions
And whatever you do, do not use C++ compiler options to set this yourself.
Upvotes: 6
Reputation: 5733
It's been a while since I did any Qt development, but there were only a couple instances that I remember spewing out huge numbers of messages like this.
I was doing Qt development targeted at an ARM processor, so I had extra oddities involved when cross-compiling.
Upvotes: 1