Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to make static EXE with commercial license?
pmh4514 last edited by
I purchased the commercial license, and installed Qt 5.3.1 on Win7 with Visual Studio 2012 as the compiler.
I created a very simple test application that is just one Qt form with a text input box. It doesn't even do anything. This of course runs just fine.
I added CONFIG += static to my .PRO file, set it to release build, ran "clean", then qmake and then rebuild all.
I then located the resulting EXE in the build folder in Windows (outside Qt) and ran it, but was shown an error indicating missing DLLs (QtWidgets.dll) and of course the EXE was very small (30kb)
How, with my new commercial license, can I build a release EXE that does not have any DLL dependencies (all statically linked), so that it can be deployed as a standalone EXE?
As a commercial customer, you can ask the Qt Company / Digia and get professional support.
Here is what I think:
You need a static build of Qt itself
Configure your build chain (Kit) so that this static build is used
Then use both CONFIG += static and CONFIG += staticlib
It may work, although I'm not sure about the platform plugin