To me it helped to add the following lines before main():
#ifdef _WIN32
#undef main
#endif
German Wikipedia also suggests to add these lines instead:
#ifdef _WIN32
#pragma comment(lib, "SDL.lib")
#pragma comment(lib, "SDLmain.lib")
#endif
Though I still had link errors when I tried second solution.