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

Thread: question about dlls..

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

  8. #8
    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.

  9. #9
    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...

  10. #10
    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.

  11. #11
    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?

  12. #12
    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)

  13. #13
    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?

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

    No,

    When i said build i meant you need to build the Qt framework - since what is already built (the dlls) are not for static use.
    //coding is already done, you just need to build the Qt framework static, and then link your application with the static Qt framework you built earlier.

    And you will need to check with MinGW documentation on how to static link the MinGW run-time (so that you don't need those two dlls for MinGW)

    And if you didn't buy commercial license, you also need to make sure you still obey LGPL license.

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

    Default Re: question about dlls..

    Would it be easy to build that static fra..?
    BTW:I build my app in release mode and it dosn't execute..exits with code: -1073741511

  16. #16
    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..

    The 1073741511 exit code means wrong dlls, did you deployed your application with the correct dlls, also check that you don't have some "older" invalid paths or check your "windows\system32" dir and see if there is any Qt dll's.

  17. #17
    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" View Post
    Would it be easy to build that static fra..?
    BTW:I build my app in release mode and it dosn't execute..exits with code: -1073741511
    There are a few copies of some dll's (they have the same name but different size), so it's possible u added the wrong ones...

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

    Default Re: question about dlls..

    Quote Originally Posted by Zlatomir View Post
    The 1073741511 exit code means wrong dlls, did you deployed your application with the correct dlls, also check that you don't have some "older" invalid paths or check your "windows\system32" dir and see if there is any Qt dll's.
    Need to fix this ASAP(I need to build in release to make file like 20 mb instead of 200 as it's now.)
    In release folder it shows this:http://min.us/lmHCMO

    Thank you.

  19. #19
    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..

    I assume you are using the Qt SDK with its included MingW compiler. Here are the points form the above discussion summarised:
    • Deploy the release DLLs (e.g. QtCore4.dll), not the debug DLLs (e.g. QtCored4.dll). This is the most likely reason that your deployment is ridiculously large. A full set of release libraries, which you are unlikely to need all of, is about 40MB.
    • Deploy the DLLs that have been built with the same compiler as your executable. This means you should deploy the DLLs found in
      • \Qt\2010.02.1\qt\bin,
      • not the ones in \Qt\2010.02.1\bin
      (adjust the path as required). This is the most likely cause of your latest problem.
    • Don't forget to deploy any plugin that your application requires. This is the most likely cause of the next problem you are likely to strike.

    The issue of what to deploy and where to put it has been done to death in these forums.

  20. #20
    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..

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.