I ve downloaded the qt6 version and mingw for gcc 11 version
-
And what's usage of the exe files in the mingw tool module file?
Dosent it cross-compile the 32bit application on the windows 64bit os ? -
@nicker-player said in I ve downloaded the qt6 version and mingw for gcc 11 version:
Dosent it cross-compile the 32bit application on the windows 64bit os ?
No, it does not.
x86_64 means that it is for x86_64 architecture (so, it generates 64bit binaries). mingw32 is just a name.
Do you really want to build for 32bit? -
Yeah in fact I just met a very difficult problem that my program was compiled with the mingw32make.
And now the new plugin was created by the c++20,I found that only gcc 11 up surpport the c++20,
I dont want to write lots of wrappers and cant trans to the vs compiler. -
@nicker-player I don't see what that has to do with 32- versus 64-bit target.
-
Yeah in fact I just met a very difficult problem that my program was compiled with the mingw32make.
As others already have written, the 32 in mingw32 is a red herring. It used to be standing for 32 bit (when I believe 16 bit was still a thing). Anyhow, nowadays it's just a name, so 'mingw32 API', 'mingw32-make' etc all also work on 64 bit!
So, coming back to the original question: Do you really need an executable that runs on Windows 32bit-only? Note that this is very rare, as Microsoft has been providing 64 bit Windows versions by default since more than a decade IIRC. The latest Windows 11 also doesn't have a 32 bit version anymore (though it seems that you could still install Windows 10 on a 32 bit only machine??).
If you do not need 32 bit actually, please use the mingw1120_64 toolchain that is part of Qt. It also contains a mingw32-make ;)
-
And if it's possible to use the gcc -m32 config to compile a 32bit application on the windows by using the mingw64-gcc11?
I put the test code and that the compiler told me that could not find the -lkernel32 something else.How to solve it?g++ -m32 -lstdc++ -o test c:\test.c
-
@nicker-player said in I ve downloaded the qt6 version and mingw for gcc 11 version:
And if it's possible to use the gcc -m32 config to compile a 32bit application on the windows by using the mingw64-gcc11?
No. If you want a 32bit binary you also need compiler which outputs 32bit binaries and you also need 32bit Qt build if your app uses Qt. Qt installer does not provide 32bit compiler and it also does not provide 32bit Qt builds anymore. You will have to install 32bit MinGW and compile Qt using this compiler by yourself.
But the question is: why do you need a 32bit binary? -
@nicker-player said in I ve downloaded the qt6 version and mingw for gcc 11 version:
And Is it hard to recompile the qt and the compiler tools ?
Compiling Qt is not an easy task. See https://wiki.qt.io/Building_Qt_5_from_Git
-
@nicker-player said in I ve downloaded the qt6 version and mingw for gcc 11 version:
Its a very long story ,cause the customer claimed that the application need to run on the old machines which only support the 32bit windows.
Then really you should use an old version of Qt which naturally supported 32-bit binaries, and tell customer they cannot have any newer features. This may well be easier in practice than trying to compile newer Qts to produce 32-bit.