我用 Qt5.3.1 编写了一个程序并在我的开发机器上运行它运行良好。我将所有必需的 .dll 文件复制到我的 .exe 所在的文件夹中。它们是:
- Qt5Widgets.dll
- Qt5Network.dll
- Qt5Gui.dll
- Qt5Core.dll
- icudt51.dll
- icuin51.dll
- icuuc51.dll
- libgcc_s_dw2-1.dll
- libwinpthread-1.dll
- libstdc++-6.dll
现在我想在没有安装 Qt 的机器上运行该程序。我怎么做?用户应该不需要为了使用程序而安装 IDE 吧?
它工作的开发机器的详细信息:
- Windows 8
- Qt 5.3.1
部署平台是:
- Windows Vista
- 没有安装 Qt,但所有必需的 .dll 都已准备就绪
我首先得到的错误是:
This application failed to start because it could not find or load the Qt platform plugin "windows". Reinstalling the application may fix this problem.
下一条错误信息是:
This application requested the Runtime to terminate in an unusual way. Please contact support.
然后程序崩溃了。 但是 如果我安装 Qt5.3.1 它就可以了。所以跟c:/Qt
目录下的文件有关系
最佳答案
此应用程序无法启动,因为它无法找到或加载 Qt 平台插件“windows”。
对于这个问题,您应该将插件{QTSDK}/plugins/platforms/qwindows.dll
复制到{YOUR_EXE_DIR}/platforms/qwindows.dll
。
关于c++ - 如何在没有安装 Qt 本身的情况下运行 Qt 程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24793363/