Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QtCreator on linux: 32-bits vs. 64-bits

Tags:

qt

qt4

qt-creator

My laptop is 64-bits, so when I start to use Qt, I chose 64-bit QtCreator. Now I'm facing a problem, I wish that the executable files I generated are runnnable on 32-bit linux system.

Can I set QtCreator to generate 32-bit executable files? So that I can decide I want to generate 32-bit ones or 64-bit ones.

I don't want to install another 32-bit QtCreator ><.

like image 731
Claire Huang Avatar asked May 25 '10 02:05

Claire Huang


2 Answers

You will need to install a 32-bit Qt, at least. You shouldn't need to install a 32-bit Qt Creator, though.

Once you install a 32-bit Qt, you should be able to add that version to Qt Creator and have it work without much trouble. You may need to force Creator to use the linux-g++-32 mkspec while compiling. If you build the 32-bit Qt yourself, you can do this by configuring with -platform linux-g++-32. If you install it from a package, hopefully the package builder has already done this.

like image 84
rohanpm Avatar answered Sep 30 '22 20:09

rohanpm


I've figure out how to generate 32-bit codes.

from the "project" tab in QtCreator: Build Settings Build Steps QMake -> show detail

put following arguments in "Additional arguments":

-spec linux-g++-32 -r
like image 35
Claire Huang Avatar answered Sep 30 '22 19:09

Claire Huang