View Full Version : How to use QT creator to distribute my application?

25th September 2010, 20:44
I've read Deploying an Application on Windows (http://doc.qt.nokia.com/4.6/deployment-windows.html)

However, is there anyway to avoid using command prompt to build QT application statically? instead of using command prompt, can QT creator in anyway build the application statically?

Like, Do I add -config -static to the qmake build step under is project tab in creator?

qmake.exe "C:/Users/Weichen/Documents/QT projects/UniqueFactorization/UniqueFactorization.pro" -r -spec win32-g++

Any help or tutorial would be nice. Thank you.

25th September 2010, 21:04
To static build your application you first need to build the Qt libraries static, that's what you need to build from console.

But check with the LGPL if you don't own commercial license, because LGPL has some restrictions about static builds.

26th September 2010, 01:35
No one have any idea how to statically build the application just using Qt creator?

26th September 2010, 02:50
Open your *.pro file with the creator, add
CONFIG += staticand recompile your application. (But as Zlatomir mentioned: you must have a static compiled Qt version.)

And why do you have problems with the command prompt?

26th September 2010, 14:01
No one have any idea how to statically build the application just using Qt creator?
I don't think that you understand me, so i will try again.

You need to perform that steps (cmd, configure -static ...other options, nmake/mingw32-make <depending on compiler: VisualC++ or MingW>) to static build the Qt framework (you perform this step once)
And than (you have Qt build static) you can add that line (the one Lykurg gave you) to your projects that you want to be linked with the static Qt build.
Hope i said it clearer this time.