Page 1 of 2 12 LastLast
Results 1 to 20 of 33

Thread: question about dlls..

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2011
    Posts
    128
    Thanks
    2

    Default question about dlls..

    Is there any way to make qt apps not ask for the dlls(mingw10,guid....)?
    I need to to upload my program and let people to download.
    I don't want them to download 190MB(exe+dlls)...so...

    Thank you.

  2. #2
    Join Date
    Feb 2011
    Location
    Latvia
    Posts
    139
    Thanks
    24
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: question about dlls..

    Hm... U doing something wrong
    I think u add the ...d.dlls (like QtCore4d.dll). Those are Debug dll's and u don't have to include them, add those without d.dll's (like QtCore4.dll).

  3. #3
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: question about dlls..

    You are building the "debug" version of your application, that has a lot of information in it for the debugger... that is meant for you to use while fix the bugs, it is not for your clients to use. (note the d in the Qt dll names: QtGuid4.dll)

    For your clients you build the "release" (after you fixed all the bugs ) and deploy that with example dll: QtGui4.dll (without that d) and the two MinGW and Qt's core and gui have about 13MB.

  4. #4
    Join Date
    Jan 2011
    Posts
    128
    Thanks
    2

    Default Re: question about dlls..

    Quote Originally Posted by Zlatomir View Post
    You are building the "debug" version of your application, that has a lot of information in it for the debugger... that is meant for you to use while fix the bugs, it is not for your clients to use. (note the d in the Qt dll names: QtGuid4.dll)

    For your clients you build the "release" (after you fixed all the bugs ) and deploy that with example dll: QtGui4.dll (without that d) and the two MinGW and Qt's core and gui have about 13MB.
    Aha...so in release mode i don't have to put the dlls in the same folder with exe?
    And I didn't understand what you wrote here:deploy that with example dll: QtGui4.dll (without that d) and the two MinGW and Qt's core and gui have about 13MB.

  5. #5
    Join Date
    Feb 2011
    Location
    Latvia
    Posts
    139
    Thanks
    24
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: question about dlls..

    Quote Originally Posted by BumbleBee
    Aha...so in release mode i don't have to put the dlls in the same folder with exe?
    No. U have to put the dll's in your folder but u've put the wrong ones...

    Quote Originally Posted by BumbleBee
    QtGui4.dll (without that d) and the two MinGW and Qt's core and gui have about 13MB.
    When u build your release version include the QtGui4.dll, mingwm10.dll and QtCore4.dll

  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: question about dlls..

    Static application will not be much smaller than dynamic application.

    190MB seems unusally large though, what files are you putting with your application?

    Eg. deploy QtGui4.dll, do not deploy QtGui4d.dll

  7. #7
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Thanks
    10
    Thanked 13 Times in 12 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: question about dlls..

    How to include all the dlls into the application and making the large exe file instead of copying the dll's and installing them in the installed folder..... Need to include al thte Dll's needed before release..

  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: question about dlls..

    Then you need to rebuild Qt and use static linking. You also need to read the license agreement about static linking.

  9. #9
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: question about dlls..

    Or use one of the many installer scripting programs to build a single installer executable that installs the multiple files you need to deploy.

  10. #10
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Thanks
    10
    Thanked 13 Times in 12 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: question about dlls..

    I just need a single large executable file with all the dll's statically linked. Help me regarding this.

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

    Default Re: question about dlls..

    We've already told you how to do this - you need to rebuild Qt.

  12. #12
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Thanks
    10
    Thanked 13 Times in 12 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: question about dlls..

    Could you explain this with the sample code..??

  13. #13
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: question about dlls..

    Quote Originally Posted by Gokulnathvc View Post
    Could you explain this with the sample code..??
    linking is a different process than coding. There is no sample code for that. You need to learn how to configure and make.

  14. #14
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: question about dlls..

    Quote Originally Posted by "BumbleBee" View Post
    Aha...so in release mode i don't have to put the dlls in the same folder with exe?...
    You still need to copy the dlls, but you will copy the release versions example: QtGui4.dll, QtCore4.dll and so on for the Qt modules you used in your application.
    You don't copy the QtGuid4.dll, QtCored4.dll dlls which are bigger.

    On my system QtGui4.dll is 9 MB and QtGuid4.dll is 147 MB, the release dlls are much smaller and also the release build is more optimized and it will run faster.

  15. #15
    Join Date
    Jan 2011
    Posts
    128
    Thanks
    2

    Default Re: question about dlls..

    Can I somehow include the dlls in my app(like compile or something..)so that the user cannot see the dlls?
    I want to give the exe only.

  16. #16
    Join Date
    Feb 2011
    Location
    Latvia
    Posts
    139
    Thanks
    24
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: question about dlls..

    U have to read about static linking... I would tell u about it but the thing is - i have no idea how to use it...

  17. #17
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: question about dlls..

    To create a static application you will need to static build Qt framework your self and if you use open source Qt, check what you are and are not allowed to do, because LGPL has some restrictions.

  18. #18
    Join Date
    Jan 2011
    Posts
    128
    Thanks
    2

    Default Re: question about dlls..

    What is this static framwaork and why does it say about gcc?

  19. #19
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: question about dlls..

    Qt is a framework and you need the static build of the framework if you want to build static application that use the Qt framework.

    The link was just an example, it says the procedure to build Qt static on Windows using MinGW (MinGW is the compiler used and it is a Windows port of the GCC)

  20. #20
    Join Date
    Jan 2011
    Posts
    128
    Thanks
    2

    Default Re: question about dlls..

    When you say build you mean some coding I have to do in my application to make the exe run alone(without dlls) on other pcs?

Similar Threads

  1. Where are .dlls searched for?
    By Cruz in forum Qt Programming
    Replies: 2
    Last Post: 15th October 2010, 14:40
  2. Linking to VB6 dlls
    By drmath in forum Qt Programming
    Replies: 0
    Last Post: 17th September 2010, 16:00
  3. Replies: 2
    Last Post: 22nd February 2007, 08:08
  4. Quick question regarding abstract classes and DLLs
    By durbrak in forum Qt Programming
    Replies: 1
    Last Post: 8th February 2007, 21:32
  5. Qt and dlls ?
    By probine in forum Qt Programming
    Replies: 4
    Last Post: 15th December 2006, 14:12

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.