I’m getting close.
I’m using mkspec linux-g++-32, and the CFLAGS, CXXFLAGS and LFLAGS all have -m32 in them and all of the object files are compiled into 32 bit.
But the linker is still using -L/usr/lib/x86_64-linux-gnu and not -L/usr/lib/i386-linux-gnu and I can not seem to find out how to fix it. Here is a copy of the linker line:
*g++ -m32 -o Test2 main.o -L/usr/lib/x86_64-linux-gnu -L/usr/share/jps-audioproc-third-party/boost/lib -lboost_program_options -lboost_system -lboost_thread -L/usr/lib/i386-linux-gnu -lQtCore -lpthread *
I have tried to remove the x86_64 directory by: LIBS -= -L/usr/lib/x86_64-linux-gnu but that did not work.
I tried changing the Projects->Build Settings->Build Environment->LD_LIBRARY_PATH to /usr/lib/i386-linux-gnu. But that did not help.
The error I get is a sequence of errors in the link process like this one:
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libpthread.so when searching for -lpthread
and here is a copy of my .pro file.
*#————————————————————————-
#
Project created by QtCreator 2014-10-14T11:06:28
#
#————————————————————————-
QT += core
QT -= gui
QMAKESPEC=linux-g++-32
QMAKE_CXXFLAGS = -std=c+0x
QMAKE_CXXFLAGS += -O0
INCLUDEPATH += /usr/share/jps-audioproc-third-party/boost/include
LIBS += -L/usr/share/jps-audioproc-third-party/boost/lib -lboost_program_options -lboost_system -lboost_thread
LIBS += -L/usr/lib/i386-linux-gnu -lpthread
LIBS -= -L/usr/lib/x86_64-linux-gnu
TARGET = Test2
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp*
↧