Qt5在Windows上部署 [英] Qt5 Deployment on Windows
问题描述
我一直在审查如何将我的桌面应用程序从Qt5 Creator部署到一组.dll和一个.exe。所记录的过程看起来很可笑: http:// qt-project .org / doc / qt-5.0 / qtdoc / deployment-windows.html 。
请帮助我更好地理解。
I have been reviewing how to deploy my desktop application from Qt5 Creator to a set of .dll's and an .exe. The process as documented seems ridiculously complex: http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html.
Please can you help me understand it better.
只是复制.dlls找到使用Dependency Walker不工作-t告诉我有一个缺少的入口点Qt5Core.dll,我已经尝试过每个单一版本的Qt5Core.dll在我的硬盘上。但我离题。
Just copying the .dlls found using the Dependency Walker does not work -t tells me there is a missing entry point for Qt5Core.dll, and I have tried every single version of Qt5Core.dll on my hard drive. But I digress.
- 它说你必须静态构建QT。
- 一旦我建立了静态,我如何撤消这个操作并回到正常的环境? 。
- 有没有我可以运行的工具,它为我做了什么?
- It says you have to build QT statically. What does this actually do?
- Once I have built statically, how do I undo this and get back to my normal environment?
- Step 1 says . Where do I find out where these options are?
- Is there a tool I can just run which does this for me?
非常感谢。
(我正在使用Windows 7和Qt 5.1。)
(I'm using Windows 7 and Qt 5.1.)
推荐答案
静态链接是罕见的。您可能正在使用LGPL许可,因此您应该动态链接。
Statically linking is rare. You are probably using LGPL licensing, so you should dynamically link.
在链接中提到的页面底部,它提供了一个示例项目的dll依赖。 p>
Towards the bottom of the page you mentioned in your link, it gives an example project's dll dependencies.
当查看Plug&使用depends工具绘制可执行文件(plugandpaint.exe),该工具列出了以下对非系统库的直接依赖性:
When looking at the release build of the Plug & Paint executable (plugandpaint.exe) with the depends tool, the tool lists the following immediate dependencies to non-system libraries:
它给出了一堆dll的图表。根据.pro文件中的模块,您将需要不同的dll和不同的运行时编译器依赖。
And then it gives the chart of a bunch of dll's. Depending on the modules in your .pro file you will need different dll's and different runtime compiler dependencies.
希望有帮助。
这篇关于Qt5在Windows上部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!