5.4. Cross-compiling the tests with MinGW-w64

5.4.1. Setup of the MinGW-w64 cross-compiling environment

Here are some instructions to setup MinGW-w64 on different Linux distributions and *BSD. Debian GNU/Linux like deb systems

This includes Debian GNU/Linux, Ubuntu, etc. The following step should probably work on any deb based system.

Run apt-get install mingw-w64. Red Hat Linux like rpm systems

This includes Fedora, Red Hat Enterprise Linux, Mandrake, most probably SuSE Linux too, etc. But this list isn't exhaustive; The following step should probably work on any rpm based system.

Run yum install mingw64-gcc. *BSD

The *BSD systems have in their ports collection only a port for the MinGW cross-compiling environment. Please see the documentation of your system about how to build and install a port.

5.4.2. Compiling the tests

Having the cross-compiling environment set up the generation of the Windows executables is easy by using the Wine build system.

If you had already run configure, then delete config.cache and re-run configure. You can then run make crosstest. To sum up:

$ rm config.cache
$ ./configure
$ make crosstest