Home >Backend Development >C++ >Why Does My C Project Show 'Unresolved External Symbol: _WinMain@16' and How Can I Fix It?
Unresolved External Symbol: _WinMain@16 Using Visual Studio
When attempting to compile and execute a simple C program involving a generic Stack class, you may encounter the following errors:
This issue arises due to a linker problem caused by an incorrect setting in Visual Studio. Here's the solution:
Changing SubSystem Setting in Visual Studio
This adjustment instructs the linker to use the console subsystem for the application, rather than the Windows subsystem. This resolves the issue of the unresolved external symbol _WinMain@16, which is required for console-based applications.
After making this change, rebuild your project and run it. The errors should no longer occur.
The above is the detailed content of Why Does My C Project Show 'Unresolved External Symbol: _WinMain@16' and How Can I Fix It?. For more information, please follow other related articles on the PHP Chinese website!