How to compile for Linux 32-bit on a Linux 64-bit platform?
Solved
Installation and Deployment
-
Dear all,
I am having hard times trying to figure out how to configure the build system to get a 32-bit executable while developing on a 64-bit Linux station.
I have done the following:
- install all 32-bit libraries
- add "-spec linux-g++-32" to qmake additional arguments
- choose the 32-bit C and C++ compilers
However in the Makefile generated by qmake I still see a lot of "/usr/lib64" paths used for the libraries instead of the expected "/usr/lib". I can see the "-m32" option used for g++ though.
Anyone knows what is missing to get the correct result?
Thanks!
-
Here is what I can see in the Makefile:
[...]
Command: /usr/bin/qmake-qt5 -spec linux-g++-32 -o Makefile ../src/myproj.pro
[...]
LIBS = $(SUBLIBS) -L/usr/lib/qt5/plugins/sqldrivers -lqsqlmysql -L/usr/lib/mysql -lmysqlclient -L/usr/lib64 -lQt5Charts -lQt5Widgets -lQt5Gui -lQt5Sql -lQt5Xml -lQt5Core -lGL -lpthreadI am expecting to see -L/usr/lib instead of -L/usr/lib64