PDA

View Full Version : is it possible to have only one stand alone .exe file and portable



Alex22
29th December 2015, 07:10
Hi,
Is it possible in Qt version "qt-opensource-windows-x86-mingw491_opengl-5.4.2" to have only one .exe that all other files like .dll's and pictures be put into that .exe file.
Now I must to put .dll's and other files beside of .exe file that i need all thing to be into one .exe file.

it is needed to have 1-stand alone and 2-portable .exe together

thanks for any help

code_err
29th December 2015, 11:41
Yes, it is possible. You have to link statically to Qt libraries, MinGW libraries during compilation, also all bitmaps load as resources. But when You link statically to Qt there are some issues related with licence. When you link dynamically (You have in folder with application all those dlls) You can use LGPL licence that will allow You to now show You source code when Your product is commercial. By linking statically You have to either public source code or buy a commercial licence. If You write for Yourself or for internal purposes of Your company it should not make any difference as far as I am aware.

Alex22
29th December 2015, 12:32
You have to link statically to Qt libraries, MinGW libraries during compilation, also all bitmaps load as resources.
thanks for your answer. could i link statically to Qt libraries by this version: "qt-opensource-windows-x86-mingw491_opengl-5.4.2"? if yes, how can it be done?
thanks in advance

d_stranz
29th December 2015, 16:40
could i link statically to Qt libraries by this version

As far as I know, all binary distributions of Qt from the Qt website are DLL versions in order to make it easy for developers to adhere to the LGPL license. If you want to link statically to the Qt libraries in your app, then you will have to build those libraries yourself from the source code. If you are writing a commercial application, then you will be violating the terms of the LGPL if you link statically, as others have said.

Judging from some of the other questions you have asked on this forum, I do not think you have the skill level required to build a static version of the Qt libraries. I think your time would be better spent in learning how to make a correct installation using your EXE and the DLLs required to make it run when installed on a non-development PC.