[Qt-interest] Static Qt Compile on Windows

Mark Brand mabrand at mabrand.nl
Mon Sep 6 14:25:49 CEST 2010


> I've been trying to compile Qt statically on Windows XP and have been
> having some issues.  The problem seems to be related to the static
> compilation and the image plugins.  I was following the instructions
> on these two (very helpful) pages:
>
>      http://www.formortals.com/how-to-statically-link-qt-4/
>      http://www.formortals.com/build-qt-static-small-microsoft-intel-gcc-compiler/

There have been been some recent changes to how the image handlers are 
built. These changes appear in 4.7.0-rc1. It's easiest just to quote:

> commit 802dc404d1af9a08fdc23ef32e2fbc77f138f70a
> Date:   Fri Jul 2 18:30:33 2010 +0200
>
> Fix incomplete support for built-in jpeg, mng, tiff and gif handlers
>
> Previously, although the configure shell script could configure
> built-in support for these image formats, the .pr[io] files
> would nevertheless build them as plugins. Support was also
> missing from qimagereader and qimagewriter. This has now been
> added.
>
> Configure.exe, while clearly intended to support this too,
> needed a few minor fixes. For example, the usage of values
> "qt" and "yes" was inconsistent.
>
> For both configure tools, the explanation of the *non*-related
> options has been clarified, i.e:
>     -no-libjpeg
>     -qt-libjpeg
>     -system-libjpeg
> These options have nothing to do with the plugin/built-in
> distinction.
>
> There are (still) no configure options for specifying "plugin" or
> "built-in" for these image formats. Quite reasonably, "plugin"
> is selected for shared Qt and "built-in" is selected for static Qt.



> I configured Qt using the following command (configuration report
> shown at the bottom of this email - note the "JPEG
> support............plugin" - I haven't found a set of configuration
> options that change this to "yes"):

I think it actually says "qt" now instead of "yes". But it won't say 
"plugin" for static Qt.

>
> I've tried this both with 4.6.3
> (qt-everywhere-opensource-src-4.6.3.zip from the nokia site) and the
> 4.7.0-rc1 release candidate (although I had to copy configure.exe from
> 4.6.3 to 4.7.0 as it was missing from the tar.gz I downloaded: the
> .zip file didn't download correctly for 4.7.0-rc1).
>

You need the right configure.exe. It was affected by these changes too. 
You can get it from the gitorious if necessary.

Although you are not cross building, you might be interested in how 
static Qt is configured in the mingw-cross-env project:

http://hg.savannah.gnu.org/hgweb/mingw-cross-env/file/ebe498f8f30a/src/qt.mk

regards,

Mark



More information about the Qt-interest-old mailing list