Results 1 to 8 of 8

Thread: windows static compiling - debug symbols

  1. #1
    Join Date
    Nov 2006
    Posts
    96

    Default windows static compiling - debug symbols

    Hi, I have compiled my QT on windows statically. All is fine and works, except the disk usage is around 3GB. I deleted temporary and garbage files using:
    Qt Code:
    1. mingw32-make clean
    To copy to clipboard, switch view to plain text mode 
    but the compiled binaries are still taking up around 2.2GB of disk space.

    Is there any way to further strip the unneeded things to free some more space (of course I still want to compile programs statically...).

    I would be greatful for any ideas?

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: windows static compiling - debug symbols

    You can recompile Qt to remove things you don't use, then your programs will also shrink in size.

  3. #3
    Join Date
    Nov 2006
    Posts
    96

    Default Re: windows static compiling - debug symbols

    No, I want all the functionality available, because you never know when you're gonna need it.

    But the actual QT size in linux (dynamical) is around 300MB, why is windows static version 2.2GB?

    Ah, then there is no change in lowering the disk usage (without losing the functionality)?

  4. #4
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: windows static compiling - debug symbols

    In your first post, you stated 'compiled binaries', hence multiple.

    Now you seem to referring to a single executable.

    Which is it? 2.2GB is indeed large for a single executable, if thats the case.

  5. #5
    Join Date
    Nov 2006
    Posts
    96

    Default Re: windows static compiling - debug symbols

    Yes multiple compiled binary...

    But on linux system they only occupy 300MB (dynmically compiled), but on windows they occupy 2.2GB (statically compiled).

    So why is there so much difference in disk space usage?

  6. #6
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: windows static compiling - debug symbols

    On Linux, all the code your linking against is kept in a shared library. On Windows, because you are statically linking, all the code you are linking against is copied to each and every executable, thus making it substantially larger. It'll also use more memory, as the code can't be shared amongst processes.

    You should dynamically link on Windows too, and your executable sizes will drop dramatically. There are very few reasons to statically link.

  7. #7
    Join Date
    Nov 2006
    Posts
    96

    Default Re: windows static compiling - debug symbols

    I'm not talking about executables. I'm talking about statically compiled qt binaries ... so the question remains the same?

  8. #8
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: windows static compiling - debug symbols

    statically compiled qt binaries? Its compiled, thus executable, and since its statically linked, you can't be talking about the Qt library, so what are you talking about?

Similar Threads

  1. newbie
    By navid in forum Qwt
    Replies: 5
    Last Post: 23rd December 2009, 08:11
  2. exception at 0x65100c40 (QtGuid4.dll)
    By sabeesh in forum Qt Programming
    Replies: 11
    Last Post: 21st December 2007, 17:10
  3. Program crashes with assert error in xcb_lock.c
    By Valheru in forum Qt Programming
    Replies: 3
    Last Post: 18th November 2007, 19:56
  4. KDE 3.5.0 crash while opening project
    By MarkoSan in forum KDE Forum
    Replies: 2
    Last Post: 19th October 2007, 16:21
  5. Replies: 11
    Last Post: 22nd March 2006, 19:06

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.