Cygwin is meant for emulating POSIX on Windows. Since Simutrans is a native Windows application, it is not the ideal choice. Some of your changes seem straight out wrong, such as using main instead of WinMain. Cygwin support will likely also be very frail, as probably no one else uses it and may easily write Cygwin incompatible code.
Mingw and Microsoft Visual Studio are more obvious choices for compiling true Windows applications. Both are free. Mingw is also more lightweight than Cygwin by avoiding most of the POSIX emulation system, or at least was last time I touched Cygwin, which is many years ago now. I don't know if Cygwin is more or less up to date with the Windows API than Mingw. Mingw64 is more up to date than Mingw, but I figuring out how to install it was troublesome last I tried, with no truly official binary releases.