You need to add -luser32 to the LIBS on Windows to get this to compile, otherwise most stuff are unresolved externals.