Home >Backend Development >C++ >Why Am I Getting 'error LNK2019: unresolved external symbol _WinMain@16' and How Do I Fix It?
When attempting to compile code containing a simple implementation of a stack template, several users encountered two errors related to unresolved external symbols. After careful analysis, the root cause was identified as a linker problem within the program's configuration.
To resolve this issue, it is crucial to modify the project's linker settings. Navigate to the "Properties" tab, followed by the "Linker" section. Under the "System" category, locate the "SubSystem" option and change it from the default setting of "Windows (/SUBSYSTEM:WINDOWS)" to "Console (/SUBSYSTEM:CONSOLE)".
This modification ensures that the program will be compiled as a console application, which is compatible with the included code. Implementing this configuration change successfully resolved the "error LNK2019" and enabled the program to compile and run as expected.
The above is the detailed content of Why Am I Getting 'error LNK2019: unresolved external symbol _WinMain@16' and How Do I Fix It?. For more information, please follow other related articles on the PHP Chinese website!