Qt应用程序DLL与QT Creator DLLs冲突 [英] Qt Apps DLLs conflicts with QT Creator DLLs

查看:239
本文介绍了Qt应用程序DLL与QT Creator DLLs冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个不同QT版本的Build服务器,而不是我的开发站。所以如果我在我的开发台上安装Build Server所构建的软件,那么由于应用程序首先在我的QT Creator目录中,我无法启动应用程序。我有一个错误窗口告诉这个:

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:

此应用程序启动失败,因为找不到或加载了QT平台插件windows。可用的平台插件是:最小的,在屏幕外,Windows,Windows。

所以我需要将c:\QT重命名为像c:\QT .bak,现在我可以启动应用程序,因为它在应用程序安装路径中找到了好的DLL。

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.

有没有人知道如何解决这个问题?为了能够运行与QT Creator不同版本的QT的应用程序。

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.

所有计算机都使用Windows。

All the computers use Windows.

谢谢

推荐答案

有可能将qt.conf文件放在与部署的相同的目录中可执行程序。在这个文件中,您可以指定这样的插件目录:

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=.

这意味着Qt将只搜索插件!在这个文件夹
在这个例子中,qwindows.dll需要在平台上/像我们习惯的那样。

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.

这对我来说非常适用,因为我有qt dll的并为我要部署的每个应用程序完全分离插件。安装的Qt版本不会再干扰了。

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.

可以在这里找到一个非常详细的写法: http://www.tripleboot.org/?p=536

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:"

这篇关于Qt应用程序DLL与QT Creator DLLs冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆