Resulting executable file was too large (Windows Mobile)



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



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



  • 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



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



  • [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.



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



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



  • 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]


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.