I tried to compile an SDL program that everyone else at this site got working with Dev-C++4.9.7.1, but I have 4.9.7.3 and I keep getting a WinMain@16 error how do I fix this
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A: Under Visual C++, you need to link with SDLmain.lib. Under the gcc build environments including Dev-C++, you need to link with the output of "sdl-config --libs", which is usually: -lmingw32 -lSDLmain -lSDL -mwindows
hope this will solve your problem.
Greetings from switzerland
Thomas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried to compile an SDL program that everyone else at this site got working with Dev-C++4.9.7.1, but I have 4.9.7.3 and I keep getting a WinMain@16 error how do I fix this
FAQ: if you link a routine with no main().
You certainly link a subroutine
Patrick
These infos are stolen from http://www.libsdl.org
Q: I get "Undefined reference to 'WinMain@16'"
A: Under Visual C++, you need to link with SDLmain.lib. Under the gcc build environments including Dev-C++, you need to link with the output of "sdl-config --libs", which is usually: -lmingw32 -lSDLmain -lSDL -mwindows
hope this will solve your problem.
Greetings from switzerland
Thomas