How to build a 32bit application on 64bit Qt Creator
-
Ok, now I´m confused.
Could you clarify the exact problem? You are on a 64bit Linux with Qt Creator 64bit installed and a valid 32bit Kit and want to create a 32bit executable. The error you posted raises after building with the 32bit Kit, if you try to run the executable? Or is the error from the build process itself? -
@sneubert The issue here, when I build a debian package it in a 64bit operating system, Qt Creator that I installed also 64bit. When debian package is finished, I am trying to install on a 64bit operating system is working, when I install on a 32bit operating system, the installation is successful, when I run the application display a notification so at the command line, because I try to run it at the command line.
-
@Renn said:
So what is to be prepared? I do not know what to be prepared to cross compile from 64bit to 32bit.
You need to install the corresponding compiler. On a 64 bits system when you install a compiler, the default is to install only the 64 bits one. But you've already said that you have a 32 bits kit on your computer...
In order to be sure, I'd compile a simple hello world program from the command line once calling the 64 bits compiler and once calling the 32 bits compiler. I'd run both of them to check that they are both executing fine. Then I'd check the binaries with the
readelf
utility @sneubert told you about. Forcing the compilation in 32/64 bits is done by adding the -m32 / -m64 to the gcc / clang command line. -
-
@Renn It is not about QtCreator. If you want to create 32bit binaries you need a compiler generating 32bit binaries. On Ubuntu the package containing g++ compiler for x86 is called g++:i386, don't know what is the name on Debian.