如何在Windows上运行基于Qt的程序 [英] How to run a Qt-based program on windows
问题描述
最近,我已经使用Qt Creator编写了一个程序.当我使用IDE执行该文件时,它运行良好,但是当我想单独运行.exe文件时,会出现警告,提示计算机中缺少诸如mingw10.dll,QtCore4.dll等文件.有谁知道我该如何解决这个问题?
Recently, I've written a program using the Qt Creator. It runs well when I execute it using the IDE, but when I want to run the .exe file alone, warnings appear that files like mingw10.dll, QtCore4.dll, etc. are missing from the computer. Does anyone know how can I solve this problem?
推荐答案
看看:
https://stackoverflow.com/a/621337/1758762
如果您已经构建了程序的发行版",请将其和以下DLL从qt \ bin复制到目录中:
If you have built a 'release' version of your program, copy it and the following DLL's from qt\bin to a directory:
QtCore4.dll,QtGui4.dll和mingwm10.dll(如果使用gcc和minGW进行编译).
QtCore4.dll, QtGui4.dll and mingwm10.dll (if you are compiling with gcc and minGW).
这篇关于如何在Windows上运行基于Qt的程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!