如何在其他计算机上运行Qt 5应用程序(Windows 7) [英] How to run Qt 5 applications on other computers (Windows 7)

查看:428
本文介绍了如何在其他计算机上运行Qt 5应用程序(Windows 7)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Windows 7 Ultimate上开发了一个Qt 5.0.2的简单应用程序。作为编译器,QtCreator使用MSVC2012_64bit。我不能将我的应用程序移动到其他计算机上。这是行不通的。 Qt应用程序需要我找不到的DLL。依赖关系浏览器认为找不到下面的 .dll 。在哪里可以找到他们?为什么这个问题如此广泛?所有的人都抱怨说,他们无法获得他们使用Qt开发的 .exe ,可以在其他电脑上工作。



EDIT1: BTW当我从互联网上下载了 DCOMP.dll 时,未找到的dll成为现在的2-3倍:)



EDIT2:另请注意,在其他计算机(Windows 7 Home Premium)上,当我双击exe文件时,它显示它加载没有任何效果,没有任何错误。

解决方案

这是我需要的dll列表,我也复制了 C:\Qt\\ \\ Qt5.0.2\5.0.2\mingw47_32\plugins\platforms 文件夹:





只是这个,它对我有用。 BTW我使用Windows 7 Ultimate 64x和Qt 5.0.2 for Windows 32位(MinGW 4.7,650 MB)软件包,用于Qt。



编辑:您可能还需要复制QtCreator的.dll,也可能需要一个名为 qt.conf 包含以下内容(从@Renato答复中复制):

  [路径] 

图书馆=。/ platforms


I have developed a simple application with Qt 5.0.2 on Windows 7 Ultimate. As a compiler the QtCreator used MSVC2012_64bit. And I cannot move my application onto other computer. It does not work. Qt application requires DLLs that I can't find. The dependency explorer thinks that the .dlls below are not found. Where I can find them? Why is this problem so wide spreaded? All the people complain that they can not get their .exe, which is developed with Qt, work on other computer .

EDIT1: BTW when I have added DCOMP.dll downloaded from the internet, the not found dlls become 2-3 times more than it is now :)

EDIT2: Also note that on other computer (Windows 7 Home Premium) when I double click on the exe file, it shows that it loades and no effect, no error nothing at all.

解决方案

This the list of dlls I needed and also I have copied the C:\Qt\Qt5.0.2\5.0.2\mingw47_32\plugins\platforms folder:

Just this and it worked for me. BTW I use Windows 7 Ultimate 64x, and Qt 5.0.2 for Windows 32-bit (MinGW 4.7, 650 MB) package for Qt.

EDIT: You might also need QtCreator's .dll to be copied and also you might need to have a file named qt.conf with the following content (copied from @Renato answer):

[Paths]

Libraries=./platforms

这篇关于如何在其他计算机上运行Qt 5应用程序(Windows 7)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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