为什么我的QT应用程序不起作用? [英] Why is my QT application not working?

查看:116
本文介绍了为什么我的QT应用程序不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 7 64位(使用msvc 2010)上使用Qt Creator构建了Qt 5应用程序. 该应用程序可以在我的计算机上完美运行,但不能在其他计算机上运行.

I built a Qt 5 application using Qt Creator on Windows 7 64 bit (using msvc 2010). The application runs perfectly on my computer but it won't work on other computers.

我将在 Dependency Walker 中显示为丢失的所有.dll复制到了程序文件夹中,没有错误,但是应用程序无法运行.

I copied all the .dlls which were shown as missing in Dependency Walker into the program folder and there is no error, but the application just won't run.

我已经在Windows XP和Windows 7 64位和32位上对其进行了测试.
我该怎么办才能找出问题所在?

I've tested it on Windows XP and Windows 7 64 and 32 bit.
What can I do in order to find out what's wrong?

更新:我安装了Qt 4.8.4(vs 2008)和msvc 2008 Express并对其进行了编译,并且它可以在其他计算机上运行,​​并带有Qt4的.dlls. 也许有人知道Qt5有什么问题...

UPDATE: i installed Qt 4.8.4 (vs 2008) and msvc 2008 express and i compiled it and it's runs on other computers, with the .dlls of Qt4. maybe someone know what the problem with Qt5...

推荐答案

我遇到了同样的问题.

您需要在可执行目录中包括包含qwindows.dll和qminimal.dll的平台"目录.您可以在插件"文件夹下找到该目录.

You need to include the "platform" directory containing qwindows.dll and qminimal.dll in your executable directory. You can find the directory under the "plugins" folder.

如果不添加它,您的应用程序将显示为正在加载,然后退出,返回码为0.依赖项遍历无法为您提供帮助,因为DLL是延迟加载的.

If you don't add this, your application will appear to load and then exit with return code 0. Dependency walker cant help you because the DLLs are delay-loaded.

这篇关于为什么我的QT应用程序不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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