Details
-
Bug
-
Resolution: Done
-
P2: Important
-
1.6.0
-
9260c1ccbe40f67e92204d35f781cd4167084753
Description
Any project should be able to demonstrate this. Use 32bit Qt version and try to build. Looks like -m32 flag is not passed to g++ when linking which leads to output like this:
linking qbs_32bit /usr/bin/g++ -Wl,--unresolved-symbols=ignore-in-shared-libs -Wl,-rpath,/home/jopoikel/work/qt/32bit/qtbase/lib '-Wl,-rpath,$ORIGIN' -L/home/jopoikel/work/qt/32bit/qtbase/lib -o /home/jopoikel/work/by_name/build-qbs_32bit-32bit-Debug/qtc_32bit_0c622edd-debug/qbs-32bit.qtc-32bit-0c622edd.228a1124/qbs_32bit /home/jopoikel/work/by_name/build-qbs_32bit-32bit-Debug/qtc_32bit_0c622edd-debug/qbs-32bit.qtc-32bit-0c622edd.228a1124/.obj/3a52ce780950d4d9/main.cpp.o /home/jopoikel/work/qt/32bit/qtbase/lib/libQt5Core.so.5.7.0 -lpthread /home/jopoikel/work/qt/32bit/qtbase/lib/libQt5Core.so.5.7.0: error adding symbols: File in wrong format collect2: error: ld returned 1 exit status Process failed with exit code 1.
Setting cpp.platformLinkerFlags to -m32 fixes the issue.