I have the following error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup,
There are a lot of threads relating to this error bu
I had this problem minutes ago. It went away when I added 'extern "C"' to the main() definition.
Oddly, another simple program I wrote yesterday is almost identical, does not have the extern "C", yet compiled without this linker error.
This makes me think the problem is some subtle setting to be found deep in some configuration dialog, and that 'extern "C"' doesn't really solve the underlying problem, but superficially makes things work.