How to build Qt statically on Windows?
I'm a Qt newbie and cannot for the life of me figure out how to deploy my simple application. From the reading I've done, it seems that after building Qt statically I can simply add the following line to my .pro file:
However, I cannot get Qt to build statically. Here are the pages I've been reading and trying to follow:
http://doc.qt.digia.com/4.7-snapshot/deployment.html
http://doc.qt.digia.com/4.7-snapshot...t-windows.html
http://qt-project.org/wiki/Build_Sta...on_for_Windows
http://www.anavi.org/article/140/
http://qt-project.org/forums/viewthread/13032
...in addition to many threads on this forum.
Maybe I'm just stupid, but I cannot figure this out.
Can anyone help me?
Re: How to build Qt statically on Windows?
Open your Qt SDK command prompt. Your compiler environment needs to be correctly set up for the configuration to detect.
Change directory to the top of a Qt sources tree. The folder will contain files like configure.exe, INSTALL, README and folders like src/, qmake/ etc.
Execute:
Code:
configure -static -release -no-exceptions // + whatever options you need especially for plugins
Answer the licence questions then watch as the build is configured. Have coffee, a power nap...
Once configured, execute:
Code:
mingw32-make sub-src
// for MingW or, for Microsoft compilers,
nmake sub-src
Make a meal, read a good book, volunteer at your local welfare organisation...
Straight from Deploying an Application on Windows