Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Why is my basic program 178 megs in size
QtWS25 Last Chance

Why is my basic program 178 megs in size

Scheduled Pinned Locked Moved Installation and Deployment
17 Posts 8 Posters 5.6k Views
  • 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.
  • K Offline
    K Offline
    kalster
    wrote on last edited by
    #5

    can i please have a step by step example on how to compile a release version of qtcore + qtgui with mingw

    1 Reply Last reply
    0
    • C Offline
      C Offline
      cincirin
      wrote on last edited by
      #6

      You don't need to compile Qt libraries. They already exist on your hdd through QtSDK and are located in .../QtSDK/Desktop/Qt/4.7.3/mingw/bin directory. Note that are named without d (not QtCored). Also you need to compile your application in release mode. If you are using QtCreator, goto in Project tab, and choose from "Edit build configuration" your mingw release configuration. If you use qmake, qmake.exe yourproject.pro -r -spec win32-g++ "CONFIG+=release"

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rokemoon
        wrote on last edited by
        #7

        If you use Qt Creator, in the lower left corner there is button with this settings, or just add to your Project.pro file
        @CONFIG += release@

        1 Reply Last reply
        0
        • R Offline
          R Offline
          rokemoon
          wrote on last edited by
          #8

          kalster please when you post code example use sush tag @@ and between them write code.

          1 Reply Last reply
          0
          • R Offline
            R Offline
            Rahul Das
            wrote on last edited by
            #9

            You can try "static":http://doc.qt.nokia.com/latest/deployment-windows.html compilation as well.


            Declaration of (Platform) independence.

            1 Reply Last reply
            0
            • G Offline
              G Offline
              giesbert
              wrote on last edited by
              #10

              [quote author="Rahul Das" date="1311759984"]You can try "static":http://doc.qt.nokia.com/latest/deployment-windows.html compilation as well. [/quote]

              Be careful with static compilation. First of all, there are no static libs provided by default so you would have to create them. Second, there are some license issues on that, e.g. AFAIK closed source with LGPL might not use static libs.

              Nokia Certified Qt Specialist.
              Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

              1 Reply Last reply
              0
              • K Offline
                K Offline
                kalster
                wrote on last edited by
                #11

                [quote author="cincirin" date="1311752501"]You don't need to compile Qt libraries. They already exist on your hdd through QtSDK and are located in .../QtSDK/Desktop/Qt/4.7.3/mingw/bin directory. Note that are named without d (not QtCored). Also you need to compile your application in release mode. If you are using QtCreator, goto in Project tab, and choose from "Edit build configuration" your mingw release configuration. If you use qmake, qmake.exe yourproject.pro -r -spec win32-g++ "CONFIG+=release"[/quote]

                when i am compiling my program, how not to compile the Qt libraries?

                1 Reply Last reply
                0
                • V Offline
                  V Offline
                  VitorAMJ
                  wrote on last edited by
                  #12

                  If you did not, make sure you have removed all Qt modules you don't need from your project.
                  From MSVC menu: Qt > Qt project Settings > Qt Modules, tab. (if you have the MSVC addin installed, wihich I strongly recommend for you).

                  What was said before was not about your code compilation it is about the Qt you are using.
                  Explaining: you have to compile Qt yourself, i.e. put away the one you downloaded and build another Qt for you from src code, using Visual Studio in your case, for static build. This Qt will generate a single .exe that will be self-contained. I never compiled the static version, but just in case you don't know:
                  -Qt compilation have to be configured correctly as Visual Studio compliant, static build,etc. (search the forum or google it)
                  -Qt compilation may/will take some time (hours)
                  -As mentioned above, there might be license restrictions to your software

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    kalster
                    wrote on last edited by
                    #13

                    the static version seems a bit complicated only to get a smaller program size at compilation and without the dlls i am assuming. When you say self-contained, are you saying that the dlls are inside of the exe file? Also, the possible license restrictions i do not like. I will stay with my downloadable qt version.

                    Will there be license restrictions if i use the downloadable qt version to compile my program?

                    I don't think I have the MSVC addin installed because there is no MSVC menu in the qt creator.

                    1 Reply Last reply
                    0
                    • R Offline
                      R Offline
                      Rahul Das
                      wrote on last edited by
                      #14

                      Yes, everything packed in the executable.
                      And about the license issue, am not sure about it,
                      but AFAIK, there wont be any issue as long as you make no changes to LGPLed library.


                      Declaration of (Platform) independence.

                      1 Reply Last reply
                      0
                      • R Offline
                        R Offline
                        Rahul Das
                        wrote on last edited by
                        #15

                        Started a new topic "here":http://developer.qt.nokia.com/forums/viewthread/8219/ about licensing.


                        Declaration of (Platform) independence.

                        1 Reply Last reply
                        0
                        • A Offline
                          A Offline
                          andre
                          wrote on last edited by
                          #16

                          [quote author="Rahul Das" date="1311840634"]Started a new topic "here":http://developer.qt.nokia.com/forums/viewthread/8219/ about licensing. [/quote]

                          There are many such topics already. Please use the search option, and refer to them first.

                          1 Reply Last reply
                          0
                          • V Offline
                            V Offline
                            VitorAMJ
                            wrote on last edited by
                            #17

                            If you are going to use visual studio to generate your code, you can download the msvc addin "here":http://qt.nokia.com/downloads/visual-studio-add-in. Then you will have some menus for Qt inside visual studio. Otherwise (MinGW), forget it :-)

                            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