Gentoo profile updating instructions
In case you are using custom $PKG_CONFIG_PATH entries, you can add separate entries for cross builds: Remember to use i686-w64-mingw32.static-pkg-config instead of pkg-config for cross builds. Note that any other compiler related environment variables (like $CC, $LDFLAGS, etc.) may spoil your compiling pleasure, so be sure to delete or disable those.
For the most isolated and repeatable environment, use a white-list approach: Note that Qt 4 is in the "qt" subdirectory.
Additionally, you should also do some background reading from the FSF (Free Software Foundation) and Wikipedia to familiarise yourself with some of the potential issues (and experience some context-switching overhead). Ownership of all contributions (bug fixes, new packages, doc updates, etc.) remain with the author.
Open MP (libgomp) and pthreads (winpthreads) are always available.Assuming you've installed it under /opt/mxe (any other directory will do as well), you should execute the following commands: you're in for a long wait, because it compiles a lot of packages.On the other hand it doesn't require any intervention, so you're free to do whatever you like – like watch a movie or go for a night on the town.After you're done it just needs a little post-installation.Instead of building MXE packages from source, you can download precompiled packages.
MXE (M cross environment) is a Makefile that compiles a cross compiler and cross compiles many free libraries such as SDL and Qt.