Warning: Cross compilieren (i586-mingw32msvc-g++ (GCC) 4.2.1-sjlj (mingw32-2)) doesn't seem to work - the program crashes on startup on Windows 7! Using the native compiler 4.4.0 on Windows it works.
The problem seems to be related to threads and exceptions.
It is also possible to compile for [Windows] on Linux. This can be useful for automating compilation.
This page is valid for Ubuntu 10.04 Lucid.
At the moment, there is not infrastructure for cross compiling. Additionally, we'll have to find out how to compile the Qt MySQL plugin.
Install the cross compiler from the mingw32 package. The version does not have to be identical to the version used to compile Qt, but probably the difference may not be too big.
The Qt library can be copied from the Qt SDK (qt/bin, qt/include, qt/lib and qt/src). The same version (moc -v
) is required for Windows and Linux because the build tools (qmake, moc, uic, qrc...) run on Linux. It might be possible to use the build tools from the Windows version with wine.
Should be similar to the way with MinGW on Windows
In startkladde.rc, \\
must be replaced with /
Some libraries are required:
mingwm10.dll
from /usr/share/doc/mingw32-runtime
([http://doc.trolltech.com/4.6/deployment-windows.html From the Qt documentation]):