Linker Error when using the SDL Library: _main already defined in main.obj
问题 So I already know why this error happens, inside the SDL_main.h file a 'main' macro is being created, which will cause problems with your actual main function. It's just that none of the obvious workarounds seem to be helping me. I have tried: Defining my main function with (int argc, char* argv[]). Tried it with C linkage like the comments in SDL_main.h suggest: * The application's main() function must be called with C linkage, * and should be declared like this: * \code * #ifdef __cplusplus