Results 1 to 7 of 7

Thread: large dll files issues

  1. #1
    Join Date
    Nov 2010
    Location
    iran/isfahan
    Posts
    13
    Thanks
    3
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows Symbian S60

    Default large dll files issues

    hello
    I have written some small applications with Qt (http://www.4shared.com/file/DLsI72QP...2__Beta_s.html , some others...) but my problem is with the LARGE size of Qt applications! if you totally create a simple QWidget in your application, it will need QtGui.dll that is about 7Mb!!!! :O
    is there any way to reduce the size of application?

  2. #2
    Join Date
    Aug 2008
    Location
    Algarve, Portugal
    Posts
    288
    Thanks
    23
    Thanked 32 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: large dll files issues

    If you have a comercial license you could compile it statically and then use upx on the exe file to reduce size. There are other considerations on reducing the app size, if you search in this foruns I believe I already read some thread's about that.
    __________________________________________________
    My projects: calculator MathGraphica ; SuperEpicMegaHero game ; GooglePlay ; bitbucket ; github
    Like my projects ? Buy me a kofi

  3. #3
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: large dll files issues

    And make sure you don't add debugging information. You can do a simple strip to remove those.

  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: large dll files issues

    Not really a fault of Qt, but more a fault of the OS. Under Linux for example, you only need one copy of the Qt library regardless of how many applications use it. Under Windows there is no central place, so applications typically include it in there installed directory.

  5. #5
    Join Date
    Aug 2008
    Location
    Algarve, Portugal
    Posts
    288
    Thanks
    23
    Thanked 32 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: large dll files issues

    Under Windows there is no central place, so applications typically include it in there installed directory
    I think for windows the central place is c:\windows\system , the problem is when different versions of the same dll arrive, that starts to cause a mess in the system, the famous dll hell
    __________________________________________________
    My projects: calculator MathGraphica ; SuperEpicMegaHero game ; GooglePlay ; bitbucket ; github
    Like my projects ? Buy me a kofi

  6. #6
    Join Date
    Nov 2010
    Location
    iran/isfahan
    Posts
    13
    Thanks
    3
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows Symbian S60

    Default Re: large dll files issues

    thank U, but is there any way to bulid custom dll with smaller size that only have that part of class implementation that I need?
    2) I read somewhere that static compiling produce LARGE .exe file instead of needing .dll files, and the problem still exists, is it true?


    Added after 5 minutes:


    Quote Originally Posted by john_god View Post
    I think for windows the central place is c:\windows\system , the problem is when different versions of the same dll arrive, that starts to cause a mess in the system, the famous dll hell
    I think it is WINDOWS_DIR/system32, but its not important because when U want to build setup package of your program, you can not assume that user has .dll files already. you should put these damn .dlls to your package!
    Last edited by alireza.mirian; 5th January 2011 at 18:25.

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

    Default Re: large dll files issues

    Sure, you have the source code, you can recompile a set of Qt DLLs specific to your project.

    If you statically link, then basically, the size of the library will be added to your executable.

    Please read and understand the license first however if you wish to static link or distribute modified DLLs with your project.

Similar Threads

  1. Replies: 5
    Last Post: 19th November 2010, 02:25
  2. Sending large datagrams(very large)
    By marcel in forum General Programming
    Replies: 1
    Last Post: 16th February 2008, 21:55
  3. Compress and Uncompress large files in QTcpSocket
    By vishesh in forum Qt Programming
    Replies: 4
    Last Post: 26th June 2007, 22:21
  4. transfer large files using qsocket
    By vishesh in forum Qt Programming
    Replies: 3
    Last Post: 2nd March 2007, 15:40
  5. fast writing of large amounts of data to files
    By TheKedge in forum Qt Programming
    Replies: 1
    Last Post: 13th February 2007, 16:33

Tags for this Thread

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.