Could anyone tell me how to define the flag? I tried $ sh configure --build=i586-pc-mingw32 CXXFLAGS="-D_WIN32 -mwin32" CPPFLAGS="-mwin32 -D_WIN32" CFLAGS="-D_WIN32 -mwin32" It seemed it didn't work for me.