When trying to compile a command line (non-GUI) program with Visual Studio I got the error:
LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
I’ve had this before and so have lots of others – it’s a continual question out there on the web – this is to provide at least one answer hopefully.
I went to:
Project Properties -> Linker -> System -> SubSystem
and set it to
Console (/SUBSYSTEM:CONSOLE)
rather than
Windows (/SUBSYSTEM:WINDOWS)
That suggested to the linker that maybe the program entry point should be “main” rather than “WinMain”