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.
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3