Solved Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.
-
In the Kit settings
-
@SGaist this one?
-
@hbatalha said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:
I am trying to build 32-bit application after successfully building the 64-bit.
Did the same project successfully built in 64-bit?
looks like uic compiler of Qt4 version is linked, clean and rebuild the project.
check whether generated "ui_mainwindow.h" file having current timestamp.
have a look into makefile and check whether it's reflecting the valid settings.
(QMAKE/CXXFLAGS) -
@nagesh said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:
Did the same project successfully built in 64-bit?
I came to realize that the 64-bit that built successfully is the Qt 6.0.0 mingw 64 bit and Qt 6.0.1 mingw 64 bit not Qt 5.15.2 mingw 64 bit as I don't have it installed.
clean and rebuild the project.
Did that multiple times, same result
check whether generated "ui_mainwindow.h" file having current timestamp.
Didn't understand, how do I do that?
have a look into makefile and check whether it's reflecting the valid settings.
How will I know if it not reflecting valid settings
-
@Christian-Ehrlicher said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:
Make sure the correct uic compiler is picked up (the Qt5 one) if you have installed and want to use Qt5
How will I check that?
-
@hbatalha in the build directory check for Makefile. Debug/Release based on your build
and search for bin/uic and confirm it's from the currect version.. -
@nagesh So I uinstalled Qt 5.15.2 MinGW 32-bit and installed Qt 5.15.1 MinGW 32-bit(just for the sake of trying), same results
search for bin/uic and confirm it's from the currect version..
C:/Qt/5.15.1/mingw81_32/bin/uic.exe
That is what I found, I guessing it is right version
-
As I already said - either there is a uic.exe from Qt4 around or you checked in the generated ui_mainwindow.h (which also then was created with a Qt4 uic) - remove both.
-
remove both.
To remove uic.exe and the generated ui_mainwindow.h???
Sorry I don't understand what exactly you are telling me to do.either there is a uic.exe from Qt4 around
I would guess no. Is there any possible scenario where you would download compilers only from qt5 and end up with some files from qt4 in them?
-
Remove the ui_mainwindow.h - it was created with an uic.exe from Qt4.
-
@Christian-Ehrlicher I did that and it solved the first error. But I am still left with the other 2 types of compiling error mentioned in the OP.
-
The documentation to QSpinBox::valueChanged() exectly desribes your problem. Reading docs is sometimes useful...
-
@Christian-Ehrlicher yeah it works, but still... when I compile using Qt 6.0.1 64-bit it works fine, it should work.
The problem is not really the compile errors, it is why my code works fine using Qt 6.0.1 64-bit and fails when using Qt 5.15.1/2 32-bit.
In the OP I posted 3 errors but it is really 3 type of errors, there are a lot more than just 3 errors all over my project and also there are other type of errors.
I tried commenting the lines that threw the errors and it compiled successfully and thus a question arose: will I have to rewrite everything so it can compile in 32-bit?? That doesn't seem right to me, I don't think it is supposed to be this way.
-
Because the overloads triggering the compilation error have been either renamed or removed in Qt 6.
-
@SGaist Since Qt 6 doesn't yet support 32-bit I should rewrite my code to get it to compile in 32-bit? It will feel like walking backwards though but if that's all to it I don't think I have much of a choice if I want to get my program in 32-bit exe.
-
@hbatalha said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:
Since Qt 6 doesn't yet support 32-bit I should rewrite my code to get it to compile in 32-bit?
You have to compile Qt6 for 32bit and then compile your app using that Qt build.
-
@hbatalha said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:
will I have to rewrite everything...
No, you don't.
You just need to modify your
connect()
statements, following the documentation that @Christian-Ehrlicher linked you: https://doc.qt.io/qt-5/qspinbox.html#valueChangedWhen your code fully compiles in Qt 5, it will also compile in Qt 6. It will work for 32-bit AND 64-bit.
...so it can compile in 32-bit??
Please understand: This is not a difference between 32-bit and 64-bit. This is a difference between Qt 5 and Qt 6.
Your current code will have the same errors with Qt 5 64-bit.
-
You just need to modify your connect() statements
Yeah I know, when I said "rewrite everything" I meant only the code that is triggering compiler errors. I think I misspoke.
When your code fully compiles in Qt 5, it will also compile in Qt 6. It will work for 32-bit AND 64-bit.
Please understand: This is not a difference between 32-bit and 64-bit. This is a difference between Qt 5 and Qt 6.
Your current code will have the same errors with Qt 5 64-bit.I am aware of all that, it just feels like walking backwards that's all. Hope the support for 32-bit in Qt 6 starts soon.
-
@hbatalha said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:
I am aware of all that, it just feels like walking backwards that's all. Hope the support for 32-bit in Qt 6 starts soon.
This means that we will not have 32bit Windows support available. Additionally, it will no longer be possible to create UWP applications on Windows 10.
If you want 32 bit Qt6, you will have to build Qt6 from sources
-
@J-Hilk said in Qt 5.15.2 MinGW 32-bit throwing errors but 64-bit version working fine.:
Unlikely:
ooh too bad then. Does this mean they are discouraging the development of 32-bit programs on windows? Is there any good reason to provide only the 64-bit version of my program.
Edit: From what I gathered providing only the 32-bit is the best option(I might've gotten it wrong though) since it will run happily on both versions so it is not looking clear to me why Qt would discontinue it.If you want 32 bit Qt6, you will have to build Qt6 from sources
Could you elaborate on that?!