Results 1 to 8 of 8

Thread: Building dependency free standalone QT 4 applications

  1. #1
    Join Date
    Jan 2007
    Location
    Dhaka, Bangladesh
    Posts
    9
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Building dependency free standalone QT 4 applications

    How can I build QT 4 applications that doesn't depend on mingwm10.dll and QT4 dll files? I've seen QT3 programs (like SQLite Database Browser) which work as standalone exe without requiring mingwm10.dll or QT library DLLs.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Building dependency free standalone QT 4 applications


  3. The following user says thank you to jacek for this useful post:

    ia32 (31st January 2007)

  4. #3
    Join Date
    Jan 2007
    Location
    Dhaka, Bangladesh
    Posts
    9
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Building dependency free standalone QT 4 applications

    I just built a static exe for a simple application (which has only a a "quit" pushbutton). The filesize is unbelievable, 52.1 MB!!! Is it normal for static QT4 executables?

    And how do I revert to default settings? Is just undoing the changes to qmake.conf and running ('configure' without any paramenter + mingw32-make sub-src) enough?

  5. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Building dependency free standalone QT 4 applications

    Quote Originally Posted by ia32 View Post
    The filesize is unbelievable, 52.1 MB!!! Is it normal for static QT4 executables?
    Sounds like you have built a debug version. Try rebuilding after "qmake -config release".
    J-P Nurmi

  6. The following user says thank you to jpn for this useful post:

    ia32 (31st January 2007)

  7. #5
    Join Date
    Jan 2007
    Location
    Dhaka, Bangladesh
    Posts
    9
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Building dependency free standalone QT 4 applications

    After "qmake -config release" it's much smaller, but still 7.2 MB

    Is there any way to make static exes of a saner size?

    BTW, thanks to everyone for help.

  8. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Building dependency free standalone QT 4 applications

    Try stripping the executable or use UPX.

  9. The following user says thank you to jacek for this useful post:

    ia32 (31st January 2007)

  10. #7
    Join Date
    Jan 2007
    Location
    Dhaka, Bangladesh
    Posts
    9
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Building dependency free standalone QT 4 applications

    Which executable stripper should I use? Something like StripReloc?

  11. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Building dependency free standalone QT 4 applications

    Quote Originally Posted by ia32 View Post
    Which executable stripper should I use?
    It really doesn't matter, as long as it works well. The one you have found works a bit differently, so you can try it together with, for example, strip.exe that comes with MinGW's binutils package.

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
  •  
Qt is a trademark of The Qt Company.