Copy .dll from .pro file [Solved]
-
Hi all,
I'm developing a Qt windows application.
In my .pro file I have:
@
..
..
DESTDIR = ../bin
...
...
@so when I build it I get the executable "myapp.exe" in ../bin directory .
To execute it I need to set some environmental variables so that it can found the Qt dll but I don't like this so I usually copy Qt dll in my "bin" directory and the application start without problem.
No I'd like to copy the Qt dll in bin directory automatically and not by hand.Is it possible to write something in my .pro so that when I build the application it also copy some file in ..bin directory ?
-
maybe "this faq":http://developer.qt.nokia.com/faq/answer/how_can_i_get_qmake_post_link_to_work_with_more_than_one_command_on_windows will help you
-
[quote author="cincirin" date="1310025479"]maybe "this faq":http://developer.qt.nokia.com/faq/answer/how_can_i_get_qmake_post_link_to_work_with_more_than_one_command_on_windows will help you[/quote]
Thanks, it works.
This is my .pro :
@
...
...
QMAKE_POST_LINK = copy c:\QtSDK\Desktop\Qt\4.7.3\mingw\lib\Qt*.dll ..\bin
...
...
@Now it should be interesting if Qt has a "variable" that already contains:
@
c:\QtSDK\Desktop\Qt\4.7.3\mingw\lib
@
so I can use for example:
@
QMAKE_POST_LINK = copy QT_LIBRARY\Qt*.dll ..\bin
@Is it possible?