QtCreator on linux: 32-bits vs. 64-bits
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 ><.
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.
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
精彩评论