3

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.)

Dirk
  • 3,073
  • 4
  • 31
  • 36

1 Answers1

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.

Community
  • 1
  • 1
phyatt
  • 18,472
  • 5
  • 61
  • 80
  • Thanks. I used the dependency walker, and add the one's it listed. I still got an error that the entry point could not be found. After some google-fu I tried all the versions of that DLL on my system, in case it was another file. No luck. – Dirk Jul 19 '13 at 16:59
  • 1
    @Dirk It also may be something with the folders that the dll needs to be in. For example, plugins go in a different folder. Post what your folder structure around your exe looks like and the dll's you put with it, and in what folder. Also post the .pro file. And post what this prints out when you run in Qt Creator `qDebug() << qApp->libraryPaths();` http://qt-project.org/doc/qt-5.1/qtcore/qcoreapplication.html#libraryPaths – phyatt Jul 19 '13 at 18:28
  • Will do tomorrow. I copied everything into a single folder (An SD card) and tried to run that. – Dirk Jul 19 '13 at 19:47