These days in the use of SDL2, has not been wrong, until the morning to move the project a place. The result always appears "error LNK2019: unresolved external symbol _sdl_main, which is referenced in function _main."
Look at the online method is said to have not correctly defined the main function, which is the SDL2main.lib to specify the required function. As a result, I defined him in a header file like "Xx.h".
I never understood the important difference between a header file and a source file. The main function is defined in a source file such as "Xx.cpp" to compile correctly.
It seems that we need to understand the compiler principle of C. (c + + cry halo in Toilet, Java and C # victory AH this is. )
Possible error logging when using SDL2 to appear "error LNK2019: unresolved external symbol _sdl_main, which is referenced in function _main"