启动Qt GUI应用程序时,DLL丢失 [英] DLL is missing when launching Qt GUI app

查看:164
本文介绍了启动Qt GUI应用程序时,DLL丢失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序从Qt Creator内部启动没有问题,但是当我进入调试文件夹时,我
找到 .exe 文件,我尝试启动它抱怨有一个名为 mingwm10.dll 的缺少的DLL。



我不知道如何

解决方案

除非您将Qt静态编辑并链接到它,否则我会尝试发布作为我的构建目标静态地,当您将其部署到另一台计算机时,您需要将Qt DLL与应用程序一起复制,只需复制mingwm10.dll(至少在我的Qt安装中的两个位置:< ;安装路径> \Qt\2010.02.1\mingw\bin < install path> \Qt\2010.02.1\qt\ bin )。



只要在自己的机器上运行,建议您添加< install path> \Qt\2010.02.1\qt\bin 您的路径环境变量的路径。这应该允许您的应用程序在IDE之外正常运行,而无需为每个项目复制dll,直到您在其他地方部署它。


My app launches from inside Qt Creator no problem, but when I go into the debug folder, I find the .exe file and I try to launch it, it complains that there is a missing DLL called mingwm10.dll.

I don't know how to fix this problem I tried the release as my build target, same thing happened.

解决方案

Unless you compiled Qt statically and link to it statically, you will need to copy the Qt DLLs with your app when you go to deploy it to another computer, just copy the mingwm10.dll with them (it's in at least two places in my Qt install: <install path>\Qt\2010.02.1\mingw\bin and <install path>\Qt\2010.02.1\qt\bin).

For just running on your own machine, I would suggest you add the <install path>\Qt\2010.02.1\qt\bin path to your "Path" environment variable. This should allow your apps to run properly outside the IDE without having to copy the dll around for every project until you go to deploy it elsewhere.

这篇关于启动Qt GUI应用程序时,DLL丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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