MinGW/Tips

From FedoraProject

< MinGW(Difference between revisions)
Jump to: navigation, search
Line 15: Line 15:
 
  LibXML2: -DLIBXML_STATIC
 
  LibXML2: -DLIBXML_STATIC
 
  Curl:    -DCURL_STATICLIB
 
  Curl:    -DCURL_STATICLIB
 +
 +
== If having trouble during ./configure ==
 +
Try mingw32-configure!

Revision as of 13:32, 10 July 2009

Contents

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

If having trouble during ./configure

Try mingw32-configure!