问题
We have a Build server with a different QT version than my dev station. So if I install the software builded by the Build server on my dev station, I can not launch the application because the app looks first in my QT Creator directories. I have an error window telling this:
This application failed to start because it could not find or load the QT platform plugin "windows". Available platform plugins are: minimal, offscreen, windows, windows.
So I need to rename c:\QT to something like c:\QT.bak and now I can launch the app because it finds the good DLL inside the app install path.
Does anyone know how to fix this? To be able to run an application with a different version of QT than the one in QT Creator.
All the computers use Windows.
Thanks
回答1:
There is a possibility to put a qt.conf file in the same directory as the deployed exe. In this file you can specify the plugins directory like this:
[Paths]
Plugins=.
This means that Qt will search for plugins only! in this folder. In this example the qwindows.dll needs to be in platforms/ like we are used to.
This works perfectly for me, because i have the qt dll's and plugins totally separated for each app i want to deploy. And the installed Qt versions don't interfere anymore.
A really detailed write-up can be found here: http://www.tripleboot.org/?p=536 in section "DLLs loaded by Qt itself a.k.a. plugins:"
来源:https://stackoverflow.com/questions/29567972/qt-apps-dlls-conflicts-with-qt-creator-dlls