Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Make program without .dll
Forum Updated to NodeBB v4.3 + New Features

Make program without .dll

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 4 Posters 1.2k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ro12man3R Offline
    ro12man3R Offline
    ro12man3
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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 ?
      ro12man3R 1 Reply Last reply
      1
      • mrjjM mrjj

        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 ?
        ro12man3R Offline
        ro12man3R Offline
        ro12man3
        wrote on last edited by
        #3

        @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).

        kshegunovK 1 Reply Last reply
        1
        • ro12man3R ro12man3

          @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).

          kshegunovK Offline
          kshegunovK Offline
          kshegunov
          Moderators
          wrote on last edited by
          #4

          @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.

          Read and abide by the Qt Code of Conduct

          ro12man3R P 2 Replies Last reply
          1
          • kshegunovK kshegunov

            @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.

            ro12man3R Offline
            ro12man3R Offline
            ro12man3
            wrote on last edited by
            #5

            @kshegunov thank you, man! Very helpful!

            1 Reply Last reply
            0
            • kshegunovK kshegunov

              @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.

              P Offline
              P Offline
              psha
              wrote on last edited by
              #6

              @kshegunov windeployqt in Release mode worked flawlessly for me, thanks

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved