Home > Backend Development > C++ > body text

Why Am I Getting \'Unresolved External Symbol _main\' Error and How to Fix It?

DDD
Release: 2024-10-29 18:46:23
Original
616 people have browsed it

Why Am I Getting

Unresolved External Symbol _main: Targeting the Correct Entry Point

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
Copy after login

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!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template