Error LNK2019: unresolved external symbol_ Main the symbol is in the function___ Tmaincrtstartup

Error:
Error LNK2019: Unable to resolve external symbol _main, which is referenced in the function ___TMainCrtStartup
Cause analysis,
I use VS2013 debugging an MFC program when the problem occurred.
1. You built a console program with VC. Its entry function should be main, and you used WinMain.

    > You open a.c/.cpp file with vc and compile it directly, using Winmian instead of main as the entry function. VC’s default Settings at this point are for console applications.

Solutions:
1. Enter the project – & gt; setting-> C/C ++, select Preprocessor in Category, remove _CONSOLE in Processor Definitions, and add _WINDOWS
2. Enter the project – & gt; setting-> Link changes /subsystem:console to /subsystem: Windows in Projections.
3. Save Settings, Rebuild All.

Read More: