From Fedora Project Wiki
(Created page with '= Tips and tricks for using the Windows cross-compiler =')
 
Line 1: Line 1:
 
= Tips and tricks for using the Windows cross-compiler =
 
= Tips and tricks for using the Windows cross-compiler =
 +
 +
== Compiling QT applications and libraries ==
 +
 +
When compiling QT-based applications and libraries the compilation may fail with the message that the library ''QtGui'' could not be found. To resolve this one must use the following command:
 +
QMAKESPEC=fedora-win32-cross qmake QT_LIBINFIX=4
 +
 +
== Using static libraries ==
 +
 +
Several MinGW packages in Fedora contain ''-static'' subpackages. These subpackages contain static libraries which can
 +
be used to create applications which contain no external dependencies on .DLL files.
 +
 +
When using these static libraries one must add some special #define's to the CFLAGS when building libraries and/or applications (depending on the static library used). If these CFLAGS are missing, the compilation of executables will most likely fail. The libraries which need additional CFLAGS are these:
 +
GLib2:  -DGLIB_STATIC_COMPILATION -DGOBJECT_STATIC_COMPILATION
 +
LibXML2: -DLIBXML_STATIC
 +
Curl:    -DCURL_STATICLIB

Revision as of 18:35, 13 April 2009

Tips and tricks for using the Windows cross-compiler

Compiling QT applications and libraries

When compiling QT-based applications and libraries the compilation may fail with the message that the library QtGui could not be found. To resolve this one must use the following command:

QMAKESPEC=fedora-win32-cross qmake QT_LIBINFIX=4

Using static libraries

Several MinGW packages in Fedora contain -static subpackages. These subpackages contain static libraries which can be used to create applications which contain no external dependencies on .DLL files.

When using these static libraries one must add some special #define's to the CFLAGS when building libraries and/or applications (depending on the static library used). If these CFLAGS are missing, the compilation of executables will most likely fail. The libraries which need additional CFLAGS are these:

GLib2:   -DGLIB_STATIC_COMPILATION -DGOBJECT_STATIC_COMPILATION
LibXML2: -DLIBXML_STATIC
Curl:    -DCURL_STATICLIB