HI, I try to deploy a qt6 app (a very simple qml example) using mingw64 qt6 from msys2. I used windeployqt6 to copy the dependencies but when I ran the app by double clicking the executable, it still missed lots of DLLs. Meanwhile I installed mingw64 qt6 using the official windows online installer. With that, the deployed app could run normally. Does anyone know the difference between those two versions of mingw64 qt6? The former could run normally from cmd if I set the PATH properly. Then I used the process monitor to see the loaded DLLs of the running apps and I found the one deployed from msys2 had loaded more than tens of additional DLLs. Does anyone have similar experience? Or what is the correct/conventinal way to deploy qt6 apps with msys2?
#Differences of qt6 of msys2 and qt6 from the windows installer
1 messages · Page 1 of 1 (latest)
The official qt6 could be statically linked. Would you like to try qt6-static package instead of qt6-base? See https://packages.msys2.org/base/mingw-w64-qt6-static
You can also share the dependencies in your installer.
Thanks for the reply. Statically linked libs is a good pointer. I just realized the static linking in this context could have a different meaning from what I thought. Normally we could not link qt Statically due to the open source license. But in this case, I think static linked qt6 libs mean the additional dependencies are archived in the qt6 DLLs. Statically linked shared libraries is a bit controversial to me. I will verify that tomorrow.
I installed mingw-w64-x86_64-qt6-static in a clean folder and I didn't see any Qt DLLs but .a files, which makes sense. Since the Qt6 from the windows installer does contain lots of Qt DLLs, I don't think the windows installer of Qt6 use statically linked libraries.