Qt 5.6.1 platforms (qwindows.dll) issue
-
Hi,
I just updated to from Qt 5.6.0 to Qt 5.6.1 using MinGW. But if I now try to run my application outside of Qt Creator (this means from a separated folder like C:\MyApp) I get the error:
"This application failed to start because it could not find or load the Qt platform plugin "windows" in ""."In this application folder I have all necessary dll even the qwindows.dll under platforms. Everything worked fine with Qt 5.6.0.
I do not have set the Qt-folder as path-variable, but it seems like my application using the qwindows.dll from it, because if I simply rename the installtion folder of Qt, I can run the application.
Another but, if I copy the new qwindows.dll from C:\Qt\5.6\mingw49_32\plugins\platforms to the platforms folder in my application folder, the same error occured.
Just a summary for your understanding:
Qt 5.6.0 installed -> running application from application folder -> no error
Qt 5.6.1 updated -> running application from the same application folder -> error
Renamed Qt (with Qt 5.6.1) -> running application from same application folder -> no error
Copied new qwindows.dll (this one from Qt 5.6.1) to the application folder and run the application -> errorI hope you understand and can help me
-
Could you try if using windeployqt you get the same problem?
-
@emtas_ri said:
I do not have set the Qt-folder as path-variable, but it seems like my application using the qwindows.dll from it
...
It worked if I used windeployqt, instead of using my standard copy n paste method.The installation folder is embedded into the developers' DLLs. When you copy and paste the DLLs into a new directory, they will still search your installation folder for plugins.
When you use
windeployqt
, the installation folder is erased from the DLL.I want to ask, why my old application stopped working since I have installed Qt 5.6.1?
There might be some kind of incompatibility when you mix Qt 5.6.0 DLLs and Qt 5.6.1 DLLs... (but they are supposed to be compatible, so I'm not sure what's happening here)
Rebuild your application using Qt 5.6.1 and the problem should go away.
Anyway, if you want to investigate, use Process Explorer to check which DLLs are being loaded by your application. Check the DLLs when you have no error, and check again when you have an error. What's the difference?
-
@JKSH Thank you for your explanation.
I didn't know that the installation folder is embedded in the DLLs, so my "old" applications are just faulty deployed.
So they are compiled with 5.6.0 but trying to use the DLLs from the embedded folder, which now holds 5.6.1 DLLs and they seems not to be compatible.
If I using windeploy everythings works fine!
So it is solved for me, thank!