Qt5 Deployment on Windows

◇◆丶佛笑我妖孽 提交于 2019-12-10 19:09:14

问题


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.

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.

  1. It says you have to build QT statically. 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 . 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.)


回答1:


Do I have to include all these Qt dlls with my application?

Statically linking is rare. You are probably using LGPL licensing, so you should dynamically link.

Towards the bottom of the page you mentioned in your link, it gives an example project's dll dependencies.

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:

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.

Hope that helps.



来源:https://stackoverflow.com/questions/17736679/qt5-deployment-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!