Home > Article > Backend Development > Why Am I Getting \"Unresolved External Symbol _main\" Error and How to Fix It?
When encountering the error "error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup," it indicates that the linker cannot find a required entry point for the program. Despite having defined a main() function, the linker may become confused.
To rectify this issue in Visual Studio 2010, navigate to:
Project -> Properties -> Configuration Properties -> Linker -> System
Under the System settings, identify the SubSystem property and set it to "Console."
This adjustment clarifies for the linker that the program is a console application and establishes the proper entry point, resolving the unresolved external symbol error.
The above is the detailed content of Why Am I Getting \"Unresolved External Symbol _main\" Error and How to Fix It?. For more information, please follow other related articles on the PHP Chinese website!