Qt Apps DLLs conflicts with QT Creator DLLs

时间秒杀一切 提交于 2019-12-25 14:05:54

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!