Install msys2 (http://www.msys2.org/)
Install the required prerequisites for Vala
pacman -S mingw64/mingw-w64-x86_64-gcc
pacman -S mingw64/mingw-w64-x86_64-pkg-config
pacman -S mingw64/mingw-w64-x86_64-vala
and all the additional packages your code requires, i.e.
pacman -S mingw64/mingw-w64-x86_64-libgee
...
Launch the correct msys2 shell
C:\msys64\mingw64.exe
Check the MSYSTEM
and PKG_CONFIG_PATH
environment variables
$ echo $MSYSTEM
MINGW64
$ echo $PKG_CONFIG_PATH
/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig
Run valac
as usual, but make sure to always work in the correct environment (see steps 3 and 4)
For example let's build the first GeeSample here:
$ valac gee-list.vala --pkg gee-0.8