Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Resulting executable file was too large (Windows Mobile)

Resulting executable file was too large (Windows Mobile)

Scheduled Pinned Locked Moved Mobile and Embedded
10 Posts 3 Posters 6.1k 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.
  • F Offline
    F Offline
    fifth
    wrote on last edited by
    #1

    My target platform is Windows Mobile 6. First, in my case, I MUST limit my final distributable package size less than 4M, and Qt would be just GUI part, so dynamic libraries wouldn't be acceptable since they are too large. I have to think of using static linkage instead to reduce size of resulting files.

    I've built the official "hello world" demo under qt\4.7.1\examples\qmake\tutorial, however, the resulting executable file size was 4.8M large, in release mode and even 11.2M in debug mode. For sure I've checked out there were only 2 Qt libraries, QCore.lib and QGui.lib, in link configuration.
    Another weird thing was that even if I removed all Qt-related code and just left an empty main(), there was still 939k (Release).
    I'm wondering what stuff was linked in, generally the expecting size would be tens of kb.

    Could someone tell me what else is linked in background? Font?
    I will only take advantage of some GUI widgets of Qt, is it possible for me to make it to be less than 2M?

    Thanks.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kamalakshantv
      wrote on last edited by
      #2

      I am unaware of Windows mobile 6. So would like to know if the Qt binaries come pre-installed on these devices. Say in case of Symbian^3^ it comes pre-installed. So the client binaries are smaller. On the other hand if it has to be installed on Symbian^1^ device then around 13Mb of binary download (smart installer) is required.

      1 Reply Last reply
      0
      • ? This user is from outside of this forum
        ? This user is from outside of this forum
        Guest
        wrote on last edited by
        #3

        Hi Qtk, you need to place the caret symbol before and after 3 in Symbian 3 to avoid the superscript problem :) can you fix that

        1 Reply Last reply
        0
        • F Offline
          F Offline
          fifth
          wrote on last edited by
          #4

          Generally there won't be Qt binaries got pre-installed on WM.
          If Qt could be pre-installed as a prerequisite component, my problem would be gone, but not the case:(

          My project is intended to be designed as a lightweight application, so the distributable package size is such an important factor and must be deliberately limited, that's why I previously said dynamic libraries would be unacceptable in my case.

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kamalakshantv
            wrote on last edited by
            #5

            [quote author="chetankjain" date="1291802466"]Hi Qtk, you need to place the caret symbol before and after 3 in Symbian 3 to avoid the superscript problem :) can you fix that[/quote]

            Thank you, didn't notice that. Have updated it. But as you might know the versions are denoted using a caret symbol. How to write it using this editor.

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kamalakshantv
              wrote on last edited by
              #6

              [quote author="fifth" date="1291802627"]Generally there won't be Qt binaries got pre-installed on WM.
              If Qt could be pre-installed as a prerequisite component, my problem would be gone, but not the case:(

              My project is intended to be designed as a lightweight application, so the distributable package size is such an important factor and must be deliberately limited, that's why I previously said dynamic libraries would be unacceptable in my case.[/quote]

              Will wait for some experts on WM and Qt to comment on it. But I feel in this case reducing the file size would be difficult.

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

                If you create a statically linked executable and want to reduce the file size for Windows (not mobile) you can use upx for doing this (see "static lib on windows":http://developer.qt.nokia.com/wiki/How_to_build_a_static_Qt_version_for_Windows_with_gcc). There exist a version for windows mobile: "XDA developers":http://forum.xda-developers.com/showthread.php?t=331706

                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
                  kamalakshantv
                  wrote on last edited by
                  #8

                  [quote author="Gerolf Reinwardt" date="1291809319"]If you create a statically linked executable and want to reduce the file size for Windows (not mobile) you can use upx for doing this (see "static lib on windows":http://developer.qt.nokia.com/wiki/How_to_build_a_static_Qt_version_for_Windows_with_gcc). There exist a version for windows mobile: "XDA developers":http://forum.xda-developers.com/showthread.php?t=331706[/quote]

                  This I assume would be compressing it and uncompressing it on the fly during installation. Might be providing better compression than default installer.

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

                    With upx you compress the excutable, not the setup. So the resulting executable stays smaller. If it is uncompressed, then during runtime, not during installation.

                    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
                    • F Offline
                      F Offline
                      fifth
                      wrote on last edited by
                      #10

                      Thanks.

                      So it will still consume a lot of memory during runtime anyway.
                      What I'm looking for is real small size.

                      [quote author="Gerolf Reinwardt" date="1291809998"]With upx you compress the excutable, not the setup. So the resulting executable stays smaller. If it is uncompressed, then during runtime, not during installation.[/quote]

                      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