error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup

Even if your project has a main() method, the linker sometimes gets confused. You can solve this issue in Visual Studio 2010 by going to

Project -> Properties -> Configuration Properties -> Linker -> System

and changing SubSystem to Console.

Leave a Comment