[SDL] Why do I need a WinMain() if I include <windows.h> under cygwin but not if I use MSVC?

Peter Mulholland darkmatter at freeuk.com
Wed Nov 8 03:30:17 PST 2006


Hello Eric,

Friday, November 3, 2006, 11:31:56 PM, you wrote:

> As the topic says...if I include <windows.h> in my SDL program written
> in C++ I need to replace main() with WinMain() for the linker to link
> if I'm compiling under cygwin (using mingw sdl binaries). However, if
> I use the same code in SDL with MSVC++ it works with main(). This 
> annoying and it would be nice to solve it.

If the linker says WinMain() is missing, you are not doing -lSDLmain
with mingw.


-- 
Best regards,
 Peter                            mailto:darkmatter at freeuk.com





More information about the SDL mailing list