Compiling exploits for windows on Linux can be a bit of a hassle.
i686-w64-mingw32-gcc exploit.c -o exploit
For 32bit
i686-w64-mingw32-gcc 40564.c -o 40564 -lws2_32