Make program without .dll



  • Hi all!

    I have a simple program, that does this functions: Making sql queries, 3-4 different widgets. Not hard.
    But when I transfer exe file with support dlls - all it takes is a huge amount of memory(500 mb).

    I understand that all that exist for crosplatform function. But I make the program only for windows and I don't want to have so big memory size. What should I do? Also, is it possible to have working program only in one exe file? Without other.


  • Qt Champions 2016

    hi
    If you can give away your source code of the application, you can use
    static linking. this means all is put into the EXE and there is no DLLS.

    If its closed source, you must buy a license for Qt to be allowed to do this.

    https://wiki.qt.io/Building_a_static_Qt_for_Windows_using_MinGW
    It is not just a click. you must recompile qt.

    • takes is a huge amount of memory(500 mb).
      500 mb for a deploy folder?
      Are you sure you just copied what was needed ?


  • @mrjj said:

    Are you sure you just copied what was needed ?

    Yes. It doesn't work without this dlls. The biggest dlls are: Qt5Guid.dll, Qt5Widgetsd.dll and Qt5Cored. Every dll is nearly 100-180 mb. Other dlls are little(until 7 mb).


  • Qt Champions 2016

    @ro12man3
    Well, you're deploying non-optimized debug builds, so yeah they can be large. Compile Qt in release, compile your application in release and you'll see that Qt5Gui.dll, Qt5Widgets.dll and Qt5Core.dll are about 10 MB each.



  • @kshegunov thank you, man! Very helpful!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.