[Development] Crosscompile on Debian stable targeting MS Windows

k blammo k.blammo at gmail.com
Thu May 3 20:25:48 CEST 2012


L.s.

For those of you that want to build Microsoft Windows binaries on
Debian stable: Here are some patches that enable cross-compiling of Qt
5 (both libraries and examples) using mingw that comes bundled with
Debian 6 (current stable).
The resulting binaries can be tested with wine on Debian 6.

Features:
* Support for old version of mingw (4.2.1)
* Out-of-tree build supported (with, for now, one minor exception)

Problems:
* Lots (and I do mean LOTS) of spurious warnings when compiling 1)
* Any support for pkg-config is untested and/or completely accidental

The "minor exception" when using out-of-tree-build concerns the
validators widget example: It does not compile because some generated
code looks for include files in the wrong place. Create symlinks in
the build directory to the "missing" sourcefiles to hack your way
around this (see attachment).

Please note that mingw 4.2.1 needs an additional constant in
"/usr/i586-mingw32msvc/include/winerror.h":
#define CO_E_NOT_SUPPORTED ((HRESULT)0x80004021L)

Tip for testing under wine: Copy the Qt dlls and example programs to the
same directory and create an empty "qt.conf" file there. Run with wine.
Serves two.

Cordially,

kb



1) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34749
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qt-xLinuxToWin32.patch
Type: text/x-diff
Size: 6128 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120503/2b940eb8/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qmake.conf
Type: config/conf
Size: 4363 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120503/2b940eb8/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qplatformdefs.h
Type: text/x-chdr
Size: 4330 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120503/2b940eb8/attachment.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qt-inbuildFix
Type: application/octet-stream
Size: 473 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120503/2b940eb8/attachment.obj>


More information about the Development mailing list