Results 1 to 4 of 4

Thread: is it possible to have only one stand alone .exe file and portable

  1. #1
    Join Date
    Nov 2015
    Posts
    128
    Thanks
    70
    Qt products
    Qt5
    Platforms
    Windows

    Default is it possible to have only one stand alone .exe file and portable

    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
    Last edited by Alex22; 29th December 2015 at 09:33.

  2. #2
    Join Date
    Sep 2011
    Posts
    86
    Thanks
    4
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: is it possible to have only one stand alone .exe file and portable

    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.

  3. The following user says thank you to code_err for this useful post:

    Alex22 (29th December 2015)

  4. #3
    Join Date
    Nov 2015
    Posts
    128
    Thanks
    70
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: is it possible to have only one stand alone .exe file and portable

    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

  5. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: is it possible to have only one stand alone .exe file and portable

    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.

Similar Threads

  1. Replies: 4
    Last Post: 2nd October 2013, 13:57
  2. Problem in file including.
    By Niamita in forum Qt Programming
    Replies: 5
    Last Post: 27th July 2011, 12:15
  3. Qt Creator PROBLEM INCLUDING 'QSystemInfo' HEADER FILE
    By Rakula in forum Qt Tools
    Replies: 1
    Last Post: 24th September 2010, 09:28
  4. How to read text file including all empty spaces..
    By umulingu in forum Qt Programming
    Replies: 1
    Last Post: 29th September 2009, 07:33
  5. Displaying pics
    By therealjag in forum Newbie
    Replies: 3
    Last Post: 12th March 2006, 23:16

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.