Cross-compiling Windows version from Linux
From Armagetron
Just collecting cross-compilation notes.
Setting up the cross compiler under linux
Check your distribution for mingw packages. If it has it, install them. If not, try this:
http://www.libsdl.org/extras/win32/cross/
Export some environment variable:
export CC=i586-mingw32msvc-gcc export CXX=i586-mingw32msvc-c++ export LD=i586-mingw32msvc-ld export AR=i586-mingw32msvc-ar export AS=i586-mingw32msvc-as export NM=i586-mingw32msvc-nm export STRIP=i586-mingw32msvc-strip export RANLIB=i586-mingw32msvc-ranlib export DLLTOOL=i586-mingw32msvc-dlltool export OBJDUMP=i586-mingw32msvc-objdump export RESCOMP=i586-mingw32msvc-windres
You might want those in a script.
Libraries
You'll need to use the same configure command to configure and install the libraries. Get libSDL and libxml2 and do this:
./configure --host=i586-mingw32msvc --prefix=/usr/i586-mingw32msvc
Prefix is the location of your cross-compiler, it should have "bin", "lib", and "include" in it.
Apparently libxml2 doesn't cross-compile, or I have to dig deeper to make it do so.