简体   繁体   English

Qt5在Windows上部署

[英]Qt5 Deployment on Windows

I have been reviewing how to deploy my desktop application from Qt5 Creator to a set of .dll's and an .exe. 我一直在研究如何将我的桌面应用程序从Qt5 Creator部署到一组.dll和.exe。 The process as documented seems ridiculously complex: http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html . 记录的过程似乎非常复杂: http//qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html
Please can you help me understand it better. 请你能帮助我更好地理解它。

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. 只是复制使用Dependency Walker找到的.dll不起作用-t告诉我Qt5Core.dll缺少入口点,我已经在我的硬盘上尝试了每个版本的Qt5Core.dll。 But I digress. 但我离题了。

  1. It says you have to build QT statically. 它说你必须静态建立QT。 What does this actually do? 这实际上是做什么的?
  2. Once I have built statically, how do I undo this and get back to my normal environment? 一旦我静态构建,我该如何撤消这个并回到我的正常环境?
  3. Step 1 says . 第1步说。 Where do I find out where these options are? 我在哪里可以找到这些选项的位置?
  4. Is there a tool I can just run which does this for me? 有没有一个我可以运行的工具为我做这个?

Many thanks. 非常感谢。

(I'm using Windows 7 and Qt 5.1.) (我使用的是Windows 7和Qt 5.1。)

Do I have to include all these Qt dlls with my application? 我是否必须将所有这些Qt dll包含在我的应用程序中?

Statically linking is rare. 静态链接很少见。 You are probably using LGPL licensing, so you should dynamically link. 您可能正在使用LGPL许可,因此您应该动态链接。

Towards the bottom of the page you mentioned in your link, it gives an example project's dll dependencies. 在链接中提到的页面底部,它给出了一个示例项目的dll依赖项。

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: 在使用depends工具查看Plug&Paint可执行文件(plugandpaint.exe)的发布版本时,该工具会将以下直接依赖项列入非系统库:

And then it gives the chart of a bunch of dll's. 然后它给出了一堆dll的图表。 Depending on the modules in your .pro file you will need different dll's and different runtime compiler dependencies. 根据.pro文件中的模块,您将需要不同的dll和不同的运行时编译器依赖项。

Hope that helps. 希望有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM