I am using community QT latest version. When I successfuly build my project I end up with .exe file and few .dll's . My question is, how set up the type of building (static or dynamic), because I want to get rid of dll's and make my project containing the one and only .exe file.
Asked
Active
Viewed 43 times
-1
-
The first step is to build `Qt` statically. Not sure if you are currently permitted to build it statically. It used to be against the licence or at least if you did this then you would have to make the source available for your application. https://stackoverflow.com/questions/12654613/static-linking-qt-with-open-source-version – drescherjm Jun 20 '19 at 22:17
-
***make my project containing the one and only .exe file*** It may be easier to just use an installer for your application. That is what I have done for the last 11 years of Qt development.. – drescherjm Jun 20 '19 at 22:21
-
drescherjm, I am new in QT, well what do you mean asking me if I am permitted? – Vladislav Kruglikov Jun 20 '19 at 22:21
-
The idea is this is a waste of your time to peruse this option if the Qt licence says you have to give out your source code for your application and you don't want to do so. – drescherjm Jun 20 '19 at 22:22
-
drescherjm, could you please give an advice of some installer? Actually I am new on the software at all. – Vladislav Kruglikov Jun 20 '19 at 22:23
-
I use NSIS as the installer for my Qt based applications. Although for me it is using mostly support that is in CMake. – drescherjm Jun 20 '19 at 22:24
-
And right there I am able to make an installer with .dll's + .exe ? – Vladislav Kruglikov Jun 20 '19 at 22:25
-
This is an alternate option: https://stackoverflow.com/questions/41943538/an-installer-for-qt-apps – drescherjm Jun 20 '19 at 22:28
-
Thanks for helping – Vladislav Kruglikov Jun 20 '19 at 22:33
-
Here is some info on the licensing: https://forum.qt.io/topic/79542/static-compile-w-o-commercial-license – drescherjm Jun 20 '19 at 22:37
-
One important thing you left out: what is your build environment? Are you building with Visual Studio (which version and are you using the QtPlugin) or maybe the QtDesigner or some flavor of GCC, Clang etc. Please edit your question to include that. – CharonX Jun 21 '19 at 08:22
1 Answers
0
I can't provide you with a detailed answer as I don't know your build environment, so I'd reccommend taking a look at Qt's HowTo pages on Builing Standalone Qt Applications for Windows - they cover the most common build environments.
(Did you try googling your question? It is actually the 2nd hit from the top).
In case you already tried this (if so, please mention that in your question next time), describe what tools you are using and exactly where you are stuck, so we can help you better.

CharonX
- 2,130
- 11
- 33