Results 1 to 9 of 9

Thread: How to copy the required dlls while building the application??

  1. #1
    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: How to copy the required dlls while building the application??

    copy the dlls and place them in the folder where the application builds..it should be copied when the application starts building...


    Added after 1 11 minutes:


    Is there a way to include the dlls to the target folder while building the application.?? it may be a release folder also>
    Last edited by Gokulnathvc; 23rd March 2011 at 06:09.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to copy the required dlls while building the application??

    Yes, you can write some rules for qmake to do it, although I see no point in doing that.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    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: How to copy the required dlls while building the application??

    It is needed because it should run in the machines without Qt installed, so it requires those dlls to run the application. So, how to copy those dlls while building or any other way to add the dll statically??

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to copy the required dlls while building the application??

    Quote Originally Posted by Gokulnathvc View Post
    It is needed because it should run in the machines without Qt installed, so it requires those dlls to run the application.
    But it's not required to copy the files during compilation. That's my point that I see no reason to do that while building. It's best to just write some deployment&packaging script that will do more than just copy the dlls. Doing that during a build might even ruin your compilation in some cases.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    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: How to copy the required dlls while building the application??

    U mean during the Setup and deployment process, making those dlls to appear in the directory right?

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

    Default Re: How to copy the required dlls while building the application??

    He means that u select you're project to release, it makes a folder "release", where u should put all the needed .dll's and this will make the .exe work.
    (I think)

  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: How to copy the required dlls while building the application??

    Am currently doing that only. but i need to place those dlls during the time of build to the release folder. Is it possible?? Or any other static methods to call the dll??

  8. #8
    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: How to copy the required dlls while building the application??

    You have already been told it is possible to have qmake copy the DLLs for you at build time, but there isn't a lot of point to doing that. On your development machine you don't need to copy these files for the application to work. The bundling of your application components and any required Qt, system or other components needed for deployment is typically handled by an installer for your application. The installer is usually called upon to register components, create file associations, create desktop icons, intelligently update libraries etc. These things cannot be done at build time because they do not happen on the build machine. There are plenty of options for installers, e.g. NSIS.

    You can statically link Qt to your application but that has nothing to do with Dynamically Linked Libraries and has impacts on licensing.

  9. #9
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: How to copy the required dlls while building the application??

    As already noted, you can write your project file to do this.

    Or, you could, you know, just copy the files where they're needed.

Similar Threads

  1. Replies: 3
    Last Post: 21st February 2011, 00:20
  2. Replies: 10
    Last Post: 9th September 2010, 16:43
  3. Application won't run - missing DLLs?
    By N3wb in forum Qt Programming
    Replies: 2
    Last Post: 21st September 2009, 22:52
  4. Application icon and big dlls
    By kei in forum Qt Programming
    Replies: 2
    Last Post: 15th June 2009, 18:38
  5. Replies: 2
    Last Post: 22nd February 2007, 08:08

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.