SDL2: LNK1561: entry point must be defined

I have found that setting /SUBSYSTEM:CONSOLE is only half of the solution. The second half is to add SDL_MAIN_HANDLED to your additional defines. The clue I used to resolve this can be found in SDL_main.h. Setting SDL_MAIN_HANDLED tell the SDL header files that you've already provided a main function and do not wish for it to redefine its own entry point.


According to this thread on Dream.In.Code:

Right click on project name -> Properties -> Expand Linker tab -> System -> SubSystem: make sure that it is Console (/SUBSYSTEM:CONSOLE)

Alternatively, if you want to hide the console window or are debugging a multithreaded application, you should set the SubSystem to Window (/SUBSYSTEM:WINDOW) instead.