How to copy/include the DLLs my application needs?
-
Hello,
How do I modify the Qt project settings so that it automatically copies whatever Qt/MinGW DLLs my application needs to the build output directory? (So I can zip it up and ship to any modern Windows machine with no Qt installed.)
Qt has a lot of DLLs, and I don't know exactly what I need.
I know about using the depends tool, but that is a manual process. (I assume Qt/MinGW already know what's needed since they just did the build and are privy to the locations of their own specific DLLs)
Thank you
-
You can "build standalone Qt application for windows with all required files":http://developer.qt.nokia.com/wiki/Build_Standalone_Qt_Application_for_Windows
Best regards,
Leon -
Careful with the LGPL restrictions about static.
A simple method (on Windows - since we are talking about .dll) is to not set anything in the path, then open the built application from Explorer and it will tell you which .dll to copy - you need two for MinGW run-time and one per Qt module.
A little more complicated is with plugins and image-formats, but after a little trial-and-error you can solve the puzzle.
//Anyway nonot1 idea would be and interesting tool ;)
-
[quote author="leon.anavi" date="1304449687"]You can "build standalone Qt application for windows with all required files":http://developer.qt.nokia.com/wiki/Build_Standalone_Qt_Application_for_Windows
[/quote]
It's been mentioned "elsewhere":http://developer.qt.nokia.com/forums/viewreply/32996/ that statically linking Qt is not the best solution. (Plus is problematic with LGPL, as the above poster said.)
Thus, my question about auto-bundling the DLL files.
-
You can read the official Qt documentation about "deploying Qt's libraries":http://doc.qt.nokia.com/latest/deployment.html#deploying-qt-s-libraries and create an installer for your application using "NSIS":http://nsis.sourceforge.net/Main_Page
Regards,
Leon