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. Qt Static Build Is Very Big
Forum Updated to NodeBB v4.3 + New Features

Qt Static Build Is Very Big

Scheduled Pinned Locked Moved Unsolved General and Desktop
31 Posts 6 Posters 12.0k 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.
  • T Taz742
    29 Jun 2017, 07:50

    @Eligijus
    If my project is 50 megabytes in release mode of how much will it be?

    E Offline
    E Offline
    Eligijus
    wrote on 29 Jun 2017, 08:28 last edited by
    #5

    @Taz742 I thought you were talking about static Qt build taking up a lot of space and not about application with statically linked Qt.
    In this case What Qt modules do you use? What is your app size if you link Qt dynamically?
    If i recall correctly my application with just core and gui modules took about 15Mb of space.

    T 2 Replies Last reply 29 Jun 2017, 08:34
    0
    • E Eligijus
      29 Jun 2017, 08:28

      @Taz742 I thought you were talking about static Qt build taking up a lot of space and not about application with statically linked Qt.
      In this case What Qt modules do you use? What is your app size if you link Qt dynamically?
      If i recall correctly my application with just core and gui modules took about 15Mb of space.

      T Offline
      T Offline
      Taz742
      wrote on 29 Jun 2017, 08:34 last edited by
      #6

      @Eligijus
      I use Qt 5.7
      My project is the following: I need only .exe which reads .xml file, this xml is written in the file's address that should be downloaded and put in my specified location.
      I have prepared everything but I do not want to use my program to duplicate .dll and other files. I need only .exe and be too small.

      Do what you want.

      1 Reply Last reply
      0
      • E Eligijus
        29 Jun 2017, 08:28

        @Taz742 I thought you were talking about static Qt build taking up a lot of space and not about application with statically linked Qt.
        In this case What Qt modules do you use? What is your app size if you link Qt dynamically?
        If i recall correctly my application with just core and gui modules took about 15Mb of space.

        T Offline
        T Offline
        Taz742
        wrote on 29 Jun 2017, 08:38 last edited by
        #7

        @Eligijus
        Unfortunately 15 megabytes is very big..
        Can I make the Qt application size <= 5 mb?

        Do what you want.

        1 Reply Last reply
        0
        • V Offline
          V Offline
          VRonin
          wrote on 29 Jun 2017, 08:40 last edited by
          #8

          See http://blog.qt.io/blog/2017/05/31/qt-lite-qt-5-9-lts/

          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
          ~Napoleon Bonaparte

          On a crusade to banish setIndexWidget() from the holy land of Qt

          T 1 Reply Last reply 29 Jun 2017, 08:53
          3
          • V VRonin
            29 Jun 2017, 08:40

            See http://blog.qt.io/blog/2017/05/31/qt-lite-qt-5-9-lts/

            T Offline
            T Offline
            Taz742
            wrote on 29 Jun 2017, 08:53 last edited by
            #9

            @VRonin
            Excuse me, I can not find ho to download it :D

            Do what you want.

            V 1 Reply Last reply 29 Jun 2017, 09:11
            0
            • T Taz742
              29 Jun 2017, 08:53

              @VRonin
              Excuse me, I can not find ho to download it :D

              V Offline
              V Offline
              VRonin
              wrote on 29 Jun 2017, 09:11 last edited by VRonin
              #10

              @Taz742 Given the level of customisation provided there is no way for Qt to deliver pre-compiled binaries. It's just a series of config options to use when building Qt from sources. use configure --list-features to see them all

              "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
              ~Napoleon Bonaparte

              On a crusade to banish setIndexWidget() from the holy land of Qt

              T 1 Reply Last reply 29 Jun 2017, 10:13
              3
              • V VRonin
                29 Jun 2017, 09:11

                @Taz742 Given the level of customisation provided there is no way for Qt to deliver pre-compiled binaries. It's just a series of config options to use when building Qt from sources. use configure --list-features to see them all

                T Offline
                T Offline
                Taz742
                wrote on 29 Jun 2017, 10:13 last edited by
                #11

                @VRonin
                Unfortunately, there are many big for me.
                I started writing my project Native c ++ (Dev-Cpp 5.11 TDM-GCC 4.9.2), but I can not write http downloader.
                Can anyone help me?

                Do what you want.

                V 1 Reply Last reply 29 Jun 2017, 10:29
                0
                • T Taz742
                  29 Jun 2017, 10:13

                  @VRonin
                  Unfortunately, there are many big for me.
                  I started writing my project Native c ++ (Dev-Cpp 5.11 TDM-GCC 4.9.2), but I can not write http downloader.
                  Can anyone help me?

                  V Offline
                  V Offline
                  VRonin
                  wrote on 29 Jun 2017, 10:29 last edited by
                  #12

                  @Taz742 said in Qt Static Build Is Very Big:

                  Dev-Cpp 5.11

                  Oh god, please no! Use a proper IDE. Qt Creator is already there for you

                  @Taz742 said in Qt Static Build Is Very Big:

                  I can not write http downloader

                  You can use libcurl. it's in C but it's only 300KB

                  P.S.
                  You are probably going off topic here give this is a Qt forum

                  "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                  ~Napoleon Bonaparte

                  On a crusade to banish setIndexWidget() from the holy land of Qt

                  T 1 Reply Last reply 29 Jun 2017, 10:39
                  0
                  • V VRonin
                    29 Jun 2017, 10:29

                    @Taz742 said in Qt Static Build Is Very Big:

                    Dev-Cpp 5.11

                    Oh god, please no! Use a proper IDE. Qt Creator is already there for you

                    @Taz742 said in Qt Static Build Is Very Big:

                    I can not write http downloader

                    You can use libcurl. it's in C but it's only 300KB

                    P.S.
                    You are probably going off topic here give this is a Qt forum

                    T Offline
                    T Offline
                    Taz742
                    wrote on 29 Jun 2017, 10:39 last edited by
                    #13

                    @VRonin said in Qt Static Build Is Very Big:

                    Oh god, please no!

                    :D:D:D:D
                    When I started learning programming (Algorithm) Dev was my friend and I love it very much :)

                    @VRonin said in Qt Static Build Is Very Big:

                    Use a proper IDE. Qt Creator is already there for you

                    Yes there is Qt but in this particular case only .exe need and very small.

                    @VRonin said in Qt Static Build Is Very Big:

                    You can use libcurl. it's in C but it's only 300KB

                    And where to use Libcurl, tell me the language of programming where I use Libcurl and then I will only have .exe 300KB.
                    Please teach me :))

                    Do what you want.

                    V 1 Reply Last reply 29 Jun 2017, 12:01
                    0
                    • T Taz742
                      29 Jun 2017, 10:39

                      @VRonin said in Qt Static Build Is Very Big:

                      Oh god, please no!

                      :D:D:D:D
                      When I started learning programming (Algorithm) Dev was my friend and I love it very much :)

                      @VRonin said in Qt Static Build Is Very Big:

                      Use a proper IDE. Qt Creator is already there for you

                      Yes there is Qt but in this particular case only .exe need and very small.

                      @VRonin said in Qt Static Build Is Very Big:

                      You can use libcurl. it's in C but it's only 300KB

                      And where to use Libcurl, tell me the language of programming where I use Libcurl and then I will only have .exe 300KB.
                      Please teach me :))

                      V Offline
                      V Offline
                      VRonin
                      wrote on 29 Jun 2017, 12:01 last edited by
                      #14

                      I love it very much

                      I guess it's a bit like my love of escargot.

                      Yes there is Qt but in this particular case only .exe need and very small.

                      There is no relation between what IDE you use and the complied output

                      And where to use Libcurl, tell me the language of programming where I use Libcurl and then I will only have .exe 300KB

                      Almost all C++ compilers can compile and link to C code. Just follow the tutorial

                      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                      ~Napoleon Bonaparte

                      On a crusade to banish setIndexWidget() from the holy land of Qt

                      M 1 Reply Last reply 29 Jun 2017, 18:03
                      6
                      • V VRonin
                        29 Jun 2017, 12:01

                        I love it very much

                        I guess it's a bit like my love of escargot.

                        Yes there is Qt but in this particular case only .exe need and very small.

                        There is no relation between what IDE you use and the complied output

                        And where to use Libcurl, tell me the language of programming where I use Libcurl and then I will only have .exe 300KB

                        Almost all C++ compilers can compile and link to C code. Just follow the tutorial

                        M Offline
                        M Offline
                        mrjj
                        Lifetime Qt Champion
                        wrote on 29 Jun 2017, 18:03 last edited by
                        #15

                        Just a note

                        Did you try
                        https://upx.github.io/

                        alt text

                        Its the charactermap sample static compiled. and then compressed.

                        Its fully transparent for the user and very fast decompressor.

                        V 1 Reply Last reply 30 Jun 2017, 06:51
                        4
                        • M mrjj
                          29 Jun 2017, 18:03

                          Just a note

                          Did you try
                          https://upx.github.io/

                          alt text

                          Its the charactermap sample static compiled. and then compressed.

                          Its fully transparent for the user and very fast decompressor.

                          V Offline
                          V Offline
                          VRonin
                          wrote on 30 Jun 2017, 06:51 last edited by
                          #16

                          @mrjj That is sort of 7zip for .exes if the problem is space on the target device that will not solve very much as the program will be decompressed before it's started.

                          It works really well, however, if your problem is transferring the file around

                          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                          ~Napoleon Bonaparte

                          On a crusade to banish setIndexWidget() from the holy land of Qt

                          M 1 Reply Last reply 30 Jun 2017, 07:32
                          2
                          • V VRonin
                            30 Jun 2017, 06:51

                            @mrjj That is sort of 7zip for .exes if the problem is space on the target device that will not solve very much as the program will be decompressed before it's started.

                            It works really well, however, if your problem is transferring the file around

                            M Offline
                            M Offline
                            mrjj
                            Lifetime Qt Champion
                            wrote on 30 Jun 2017, 07:32 last edited by
                            #17

                            @VRonin

                            Well it decompresses to memory so unless its a size memory issue (on target), it should not matter.

                            But of course it wont be as lovely small as curl + pugixml :)

                            T 1 Reply Last reply 30 Jun 2017, 07:42
                            1
                            • M mrjj
                              30 Jun 2017, 07:32

                              @VRonin

                              Well it decompresses to memory so unless its a size memory issue (on target), it should not matter.

                              But of course it wont be as lovely small as curl + pugixml :)

                              T Offline
                              T Offline
                              Taz742
                              wrote on 30 Jun 2017, 07:42 last edited by
                              #18

                              @mrjj said in Qt Static Build Is Very Big:

                              https://upx.github.io/

                              It's vey hard for me.

                              Do what you want.

                              M 1 Reply Last reply 30 Jun 2017, 08:08
                              0
                              • T Taz742
                                30 Jun 2017, 07:42

                                @mrjj said in Qt Static Build Is Very Big:

                                https://upx.github.io/

                                It's vey hard for me.

                                M Offline
                                M Offline
                                mrjj
                                Lifetime Qt Champion
                                wrote on 30 Jun 2017, 08:08 last edited by
                                #19

                                @Taz742

                                What is very hard ?

                                T 1 Reply Last reply 30 Jun 2017, 08:31
                                0
                                • M mrjj
                                  30 Jun 2017, 08:08

                                  @Taz742

                                  What is very hard ?

                                  T Offline
                                  T Offline
                                  Taz742
                                  wrote on 30 Jun 2017, 08:31 last edited by Taz742
                                  #20

                                  @mrjj
                                  UPX only decompresses .exe?
                                  UPX can not just make it from my files only .exe ?

                                  Do what you want.

                                  M 1 Reply Last reply 30 Jun 2017, 08:38
                                  0
                                  • T Taz742
                                    30 Jun 2017, 08:31

                                    @mrjj
                                    UPX only decompresses .exe?
                                    UPX can not just make it from my files only .exe ?

                                    M Offline
                                    M Offline
                                    mrjj
                                    Lifetime Qt Champion
                                    wrote on 30 Jun 2017, 08:38 last edited by
                                    #21

                                    @Taz742

                                    yes it reduce size of exe.

                                    its not installer.

                                    you must produce single exe then compress it.

                                    T 1 Reply Last reply 30 Jun 2017, 08:46
                                    1
                                    • M mrjj
                                      30 Jun 2017, 08:38

                                      @Taz742

                                      yes it reduce size of exe.

                                      its not installer.

                                      you must produce single exe then compress it.

                                      T Offline
                                      T Offline
                                      Taz742
                                      wrote on 30 Jun 2017, 08:46 last edited by Taz742
                                      #22

                                      Thank @mrjj very much.
                                      If I made my project on Qt and I would make it static build And .Exe will be a maximum of 15 megabytes, UPX will bring it down 15 -
                                      min(15 * 50 / 100, 15 * 70 / 100), This is a lot for me.
                                      I would be happy with only about 500 kilobytes :(.
                                      Let's take the name of everyone skype installer. Where can it be written?
                                      Excuse me to get my problems out of Qt. I did not want a flood this topic.

                                      Do what you want.

                                      E M 3 Replies Last reply 30 Jun 2017, 09:54
                                      0
                                      • T Taz742
                                        30 Jun 2017, 08:46

                                        Thank @mrjj very much.
                                        If I made my project on Qt and I would make it static build And .Exe will be a maximum of 15 megabytes, UPX will bring it down 15 -
                                        min(15 * 50 / 100, 15 * 70 / 100), This is a lot for me.
                                        I would be happy with only about 500 kilobytes :(.
                                        Let's take the name of everyone skype installer. Where can it be written?
                                        Excuse me to get my problems out of Qt. I did not want a flood this topic.

                                        E Offline
                                        E Offline
                                        Eeli K
                                        wrote on 30 Jun 2017, 09:54 last edited by
                                        #23

                                        @Taz742 From the beginning of this thread it has been unclear to me what you actually want to do. For example, if you want to have a simple Windows-only application with a graphical user interface which does only one simple thing and whose size goes under 5MB, Qt isn't a good solution for you. See https://blog.qt.io/blog/2017/05/31/qt-lite-qt-5-9-lts/ for size comparison and you can see that under 5MB is so-and so with the Lite system, but under 1MB is unrealistic. The very small applications you see on Windows use some lighweight libraries or maybe only Microsoft's own Windows APIs. The reason they are small is because Windows has many libraries installed by default, not because Qt is bloated. If just under 5MB is acceptable, you can try e.g. wxWidgets, see https://wiki.wxwidgets.org/Reducing_Executable_Size. If you have a command line application without windows and widgets you shouldn't be using Qt in this case at all.

                                        1 Reply Last reply
                                        3
                                        • T Taz742
                                          30 Jun 2017, 08:46

                                          Thank @mrjj very much.
                                          If I made my project on Qt and I would make it static build And .Exe will be a maximum of 15 megabytes, UPX will bring it down 15 -
                                          min(15 * 50 / 100, 15 * 70 / 100), This is a lot for me.
                                          I would be happy with only about 500 kilobytes :(.
                                          Let's take the name of everyone skype installer. Where can it be written?
                                          Excuse me to get my problems out of Qt. I did not want a flood this topic.

                                          M Offline
                                          M Offline
                                          mrjj
                                          Lifetime Qt Champion
                                          wrote on 30 Jun 2017, 09:59 last edited by
                                          #24

                                          @Taz742 said in Qt Static Build Is Very Big:

                                          15 -min(15 * 50 / 100, 15 * 70 / 100), This is a lot for me.

                                          I have no idea what this shows.
                                          Normally upx compress it to 1/3 of size.

                                          1 Reply Last reply
                                          0

                                          14/31

                                          29 Jun 2017, 12:01

                                          • Login

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