Solved Qt 5.15.5 on Windows?
-
I create static builds for one of my projects on Linux, Windows and macOS. Recently, I updated the virtual machines I use for this task to Qt 5.15.5. This was no problem on Linux and macOS, I could build my static Qt as before, and the static build of my project works just as fine.
On Windows however, I could not update to 5.15.5. Using the maintenance tool, only 5.15.2 is selectable (followed by Qt 6, but I want to keep Windows 7 compatibility, so I want to build with Qt 5 as long as possible).
I tried to manually download the Qt 5.15.5 sources and could also create and install a static Qt build. I could also compile my project. But when I try to use it, there are missing DLLs, so I think the toolchain only works for Qt 5.15.2.
Is there a special reason why it's not possible to use Qt 5.15.5 on Windows (and we're stuck at 5.15.2)? Or is it possible, and if so, what do I have to change to make it work?
It's not that I was hit by some bug present in 5.15.2 and that I really do have to update to 5.15.5. I'm only wondering why it's no problem on Linux and macOS, but on Windows.
-
@l3u_ said in Qt 5.15.5 on Windows?:
Is there a special reason why it's not possible to use Qt 5.15.5 on Windows (and we're stuck at 5.15.2)?
Binary releases > 5.15.2 are for commercial users. But I'm confused by your post: you're writing that you're building Qt as static libs but also that you're trying to install using Maintenance tool - why?
What DLLs are missing?
-
I installed the 5.15.2 sources (and the toolchain – as Windows doesn't ship all this) using the Maintenance tool. Then, I simply tried to install the 5.15.5 sources in the same way.
It was some gcc dll … I discarded the vm snapshot afterwards. But maybe I missed somehting whilst building Qt? One should be able to build Qt 5.15.5 on Windows (using the toolchain shipped with Qt 5.15.2), right?
Or do I actually only need mingw32 to build Qt? Sorry, I'm not so fit on Windows ;-)
-
@l3u_ said in Qt 5.15.5 on Windows?:
One should be able to build Qt 5.15.5 on Windows (using the toolchain shipped with Qt 5.15.2), right?
Yes, should work.
When does this "missing DLL" error occur? If you're trying to run a deployed app? -
@jsulm said in Qt 5.15.5 on Windows?:
When does this "missing DLL" error occur? If you're trying to run a deployed app?
Yes, exactly
-
@l3u_ Then you can add missing DLLs manually. Those from MinGW are in your MinGW installation.
-
Actually, I simply forgot to tweak
qtbase\mkspecs\win32-g++\qmake.conf
and to add
QMAKE_LFLAGS += -static -static-libgcc QMAKE_CFLAGS_RELEASE -= -O2 QMAKE_CFLAGS_RELEASE += -Os -momit-leaf-frame-pointer DEFINES += QT_STATIC_BUILD
Building Qt 5.15.5 with this change made the static output work :-)