Error:
Error LNK2019: Unable to resolve external symbol _main, which is referenced in the function ___TMainCrtStartup
Cause analysis,
I use VS2013 debugging an MFC program when the problem occurred.
1. You built a console program with VC. Its entry function should be main, and you used WinMain.
- > You open a.c/.cpp file with vc and compile it directly, using Winmian instead of main as the entry function. VC’s default Settings at this point are for console applications.
Solutions:
1. Enter the project – & gt; setting-> C/C ++, select Preprocessor in Category, remove _CONSOLE in Processor Definitions, and add _WINDOWS
2. Enter the project – & gt; setting-> Link changes /subsystem:console to /subsystem: Windows in Projections.
3. Save Settings, Rebuild All.
Read More:
- Vs error unresolved external symbol_ Main, the symbol in the function “int”__ cdecl invoke_ main
- LNK2001: unresolved external symbol maincrtstartup
- [OpenGL · error] visual studio 2019 reports an error. It is an external symbol gladloadglloader that cannot be parsed. This symbol is referenced in the function main
- error LNK2019: Unresolved external symbol-resolution record
- LINK : error LNK2001: unresolved external symbol _mainCRTStartup
- DirectX encountered “unresolved external symbol” when compiling on vs2015__ The solution and reason of “vsnwprintf”
- Error lnk1120: 2 unresolved external commands: vtkrenderingopengl_ Autoinit (construct, destroy), which is referenced in
- LNK2019 failed to parse external symbol error
- Solutions to the problem of “symbol lookup error xxxxx, undefined symbol”
- dyld: lazy symbol binding failed: Symbol not found: _clock_gettime
- chattr: symbol lookup error: chattr: undefined symbol: fsetproject
- fatal error LNK1120: 1 unresolved externals
- Allegro’s solution to “symbol is missing a refdes”
- When Maven hits the jar package, an error is reported when executing install, and the symbol cannot be found in a line
- How to Fix Fatal Error lnk1120: 1 unresolved externals
- Prompt “XXX is” when debugging real machine busy:Processing symbol Files “and” Xcode will continue when XXX is finished“
- xcode will continue when iPhone is finished iPhone is busy:Processing symbol files
- DB2 create table error – 104 42601 illegal symbol encountered in SQL statement
- [Solved] KEIL MDK Warning: “no browse info for symbol in this context”
- package xxx does not exist cannot find symbol