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. My qt exe size is very huge
Forum Updated to NodeBB v4.3 + New Features

My qt exe size is very huge

Scheduled Pinned Locked Moved Unsolved General and Desktop
13 Posts 6 Posters 276 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.
  • U unknown968787

    the steps i used to compile

    1 - i opened the native x86 tools

    2 - qmake -project to create .pro file

    3 - i edited the .pro file by adding CONFIG += console

    4 - and then qmake then nmake then nmake release

    and the size became 10 mb it is just hello world console

    is there a way to reduce the size like 1 mb or less ???

    J.HilkJ Offline
    J.HilkJ Offline
    J.Hilk
    Moderators
    wrote last edited by
    #3

    @unknown968787 did you add huge graphics or other files to your project / resources ?

    Even for a debug build, 10 mb is excessive for non static qt builds


    Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


    Q: What's that?
    A: It's blue light.
    Q: What does it do?
    A: It turns blue.

    U 1 Reply Last reply
    0
    • jsulmJ jsulm

      @unknown968787 said in My qt exe size is very huge:

      is there a way to reduce the size like 1 mb or less ???

      Did you build in debug or release mode?

      U Offline
      U Offline
      unknown968787
      wrote last edited by
      #4

      @jsulm i am not really sure these are the steps i took

      projects:

      1 - create a folder
      2 - open native x86 cmd and cd the folder
      3 - cd the project folder
      4 - create main.cpp
      5 - qmake -project to create .pro file
      6 - add CONFIG += console | QT += core gui widgets to the .pro file
      7 - qmake
      8 - nmake
      9 - nmake release

      1 Reply Last reply
      0
      • J.HilkJ J.Hilk

        @unknown968787 did you add huge graphics or other files to your project / resources ?

        Even for a debug build, 10 mb is excessive for non static qt builds

        U Offline
        U Offline
        unknown968787
        wrote last edited by
        #5

        @J.Hilk no graphics at all it is just a console hello world app no more

        1 Reply Last reply
        0
        • Christian EhrlicherC Online
          Christian EhrlicherC Online
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote last edited by
          #6

          What Qt version do you use and how was it built?

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          U 1 Reply Last reply
          0
          • Christian EhrlicherC Christian Ehrlicher

            What Qt version do you use and how was it built?

            U Offline
            U Offline
            unknown968787
            wrote last edited by
            #7

            @Christian-Ehrlicher

            this is how i am building

            projects:
            1 - create a folder
            2 - open native x86 cmd and cd the folder
            3 - cd the project folder
            4 - create main.cpp
            5 - qmake -project to create .pro file
            6 - add CONFIG += console | QT += core gui widgets to the .pro file
            7 - qmake
            8 - nmake
            9 - nmake release

            i am using Qt creator 4.11.0

            JonBJ Christian EhrlicherC 2 Replies Last reply
            0
            • U unknown968787

              @Christian-Ehrlicher

              this is how i am building

              projects:
              1 - create a folder
              2 - open native x86 cmd and cd the folder
              3 - cd the project folder
              4 - create main.cpp
              5 - qmake -project to create .pro file
              6 - add CONFIG += console | QT += core gui widgets to the .pro file
              7 - qmake
              8 - nmake
              9 - nmake release

              i am using Qt creator 4.11.0

              JonBJ Online
              JonBJ Online
              JonB
              wrote last edited by
              #8

              @unknown968787 said in My qt exe size is very huge:

              i am using Qt creator 4.11.0

              That is a version of Creator, the IDE, not of the Qt libraries you a re using. And it's a few years old. We don't where you got the Qt from, how it was built.

              I am not sure whether

              8 - nmake
              9 - nmake release

              means you are looking at an executable from your project build for release (make per #9) or for debug (possibly per #8). Someone else may know. I would look at the compiler flags being passed on the compilation command line.

              Pl45m4P 1 Reply Last reply
              0
              • U unknown968787

                @Christian-Ehrlicher

                this is how i am building

                projects:
                1 - create a folder
                2 - open native x86 cmd and cd the folder
                3 - cd the project folder
                4 - create main.cpp
                5 - qmake -project to create .pro file
                6 - add CONFIG += console | QT += core gui widgets to the .pro file
                7 - qmake
                8 - nmake
                9 - nmake release

                i am using Qt creator 4.11.0

                Christian EhrlicherC Online
                Christian EhrlicherC Online
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote last edited by
                #9

                @unknown968787 said in My qt exe size is very huge:

                this is how i am building

                I don't care.

                I want to know:

                • the Qt version you are using
                • how this Qt version was built / were it came from

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                U 1 Reply Last reply
                3
                • JonBJ JonB

                  @unknown968787 said in My qt exe size is very huge:

                  i am using Qt creator 4.11.0

                  That is a version of Creator, the IDE, not of the Qt libraries you a re using. And it's a few years old. We don't where you got the Qt from, how it was built.

                  I am not sure whether

                  8 - nmake
                  9 - nmake release

                  means you are looking at an executable from your project build for release (make per #9) or for debug (possibly per #8). Someone else may know. I would look at the compiler flags being passed on the compilation command line.

                  Pl45m4P Offline
                  Pl45m4P Offline
                  Pl45m4
                  wrote last edited by
                  #10

                  @JonB said in My qt exe size is very huge:

                  That is a version of Creator, the IDE, not of the Qt libraries you a re using. And it's a few years old

                  “A few” is an understatement, QtC 4 is about 10 years old or so :D

                  @unknown968787

                  It doesn't help if you repeat to post the steps you might have done over and over again.
                  Also: how and where did you check the file size?


                  If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                  ~E. W. Dijkstra

                  U 1 Reply Last reply
                  0
                  • Pl45m4P Pl45m4

                    @JonB said in My qt exe size is very huge:

                    That is a version of Creator, the IDE, not of the Qt libraries you a re using. And it's a few years old

                    “A few” is an understatement, QtC 4 is about 10 years old or so :D

                    @unknown968787

                    It doesn't help if you repeat to post the steps you might have done over and over again.
                    Also: how and where did you check the file size?

                    U Offline
                    U Offline
                    unknown968787
                    wrote last edited by
                    #11

                    @Pl45m4 i got it from the official site because the latest Qt is 64bit and 32 bit is only in the older versions after nmake and nmake release i got exe file thatis where i saw the size !!!

                    1 Reply Last reply
                    0
                    • Christian EhrlicherC Christian Ehrlicher

                      @unknown968787 said in My qt exe size is very huge:

                      this is how i am building

                      I don't care.

                      I want to know:

                      • the Qt version you are using
                      • how this Qt version was built / were it came from
                      U Offline
                      U Offline
                      unknown968787
                      wrote last edited by
                      #12

                      @Christian-Ehrlicher

                      C:\Users\unknown>qmake -v
                      QMake version 3.1
                      Using Qt version 5.12.12

                      1 Reply Last reply
                      0
                      • Christian EhrlicherC Online
                        Christian EhrlicherC Online
                        Christian Ehrlicher
                        Lifetime Qt Champion
                        wrote last edited by
                        #13

                        I can't test this ancient version but would guess you installed a static Qt version. Therefore all is linked directly into your executable which explains the size.

                        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                        Visit the Qt Academy at https://academy.qt.io/catalog

                        1 Reply Last reply
                        1

                        • Login

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