error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
and how to resolve it?
Perhaps you forgot to define the global main function.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
You need to make sure you're compiling a "console" program (which expects main()), or a GUI program (which expects WinMain())
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
IIRC, goto project options -> c/c++ -> linker -> system -> find option subsystem, set to console.
This is taken from memory because I don't have the IDE to check right now. But it's there somewhere.
Or you can create a new project and copy your files over. Be sure to select a win32 console project.