Qt Application Install/Running on Windows
-
wrote on 18 May 2011, 14:32 last edited by
Hi All,
I created a small utility in Qt that runs good on linux.
But, it is not running on windows without either QT SDK or the dll files.
The application is compiled with static option, but still needs those dll.
The dlls are around 200MB and my app is around 1MB. So, the user has to download a 200MB file [50+MB compressed].Just wanted to know if there is any other way of making things work on windows in a better way.
Thanks in advance. -
wrote on 18 May 2011, 14:44 last edited by
Hi,
are you sure, you have libraries for static linking? Did you create Qt by hand for those libs? otherwise you only have dynamic libs. If you link statically, you have to regard the license issues. If you search for static linking on the forum, you will find threads about this topic.
-
wrote on 18 May 2011, 14:52 last edited by
Also check if you need all dll's. Probably you'll need only QtCore4.dll and QtGui4.dll, which should take about 15 MB instead of 200.
-
wrote on 18 May 2011, 15:03 last edited by
Thank you, Gerolf for the reply.
The dlls are Qt dlls [mingw32*, QtGui*.dll ..]
The only reason for going for static is to make the installing/running of utility easy [1 step].
I will search in this forum also for the various linking methods/procedures. -
wrote on 18 May 2011, 15:06 last edited by
Can you post your .pro file ?
QTCore4.dll is larger than 2 Mb so it's strange that your statically linked application was about 1MB -
wrote on 18 May 2011, 15:10 last edited by
I assume it's not statically linked, if he had not rebuild Qt completely.
The SDK does not contain libs for static binding. -
wrote on 18 May 2011, 15:10 last edited by
Thank you, Maciek for the reply.
I'll try with only those dlls and will do some trail and error method to identify only the required dlls. QtGuid4.dll alone is 147MB. -
wrote on 18 May 2011, 15:14 last edited by
The .pro file of the utility is below:
QT += core gui
TARGET = concute
TEMPLATE = appSOURCES += main.cpp
concute.cppHEADERS += concute.h
FORMS += concute.ui
RESOURCES +=
seccutersrc.qrcCONFIG += static release no-exceptions
-
wrote on 18 May 2011, 15:15 last edited by
[quote author="amanhardikar" date="1305731457"]Thank you, Maciek for the reply.
I'll try with only those dlls and will do some trail and error method to identify only the required dlls. QtGuid4.dll alone is 147MB.[/quote]This is the debug dll!
You should only distribute release dlls, which means QtGui4.dll, which has (in 4.7.2, mingw) 9,7 MBAll dlls with the pattern XXXd4.dll are debug libraries. Take those with XXX4.dll, they are release and much smaller.
-
wrote on 18 May 2011, 15:23 last edited by
Thank you, Gerolf for the explanation. I thought I have to include these dlls also.
I removed them and tested and found the app to the running without any issues. :)
1/10