PDA

View Full Version : How to copy the required dlls while building the application??



Gokulnathvc
23rd March 2011, 06:09
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>

wysota
23rd March 2011, 07:56
Yes, you can write some rules for qmake to do it, although I see no point in doing that.

Gokulnathvc
23rd March 2011, 08:07
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??

wysota
23rd March 2011, 08:23
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.

Gokulnathvc
23rd March 2011, 09:19
U mean during the Setup and deployment process, making those dlls to appear in the directory right?

Archa4
23rd March 2011, 09:28
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)

Gokulnathvc
23rd March 2011, 09:33
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??

ChrisW67
23rd March 2011, 10:12
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.

SixDegrees
23rd March 2011, 10:13
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.