The problem seems to be that some functions in the add library are incompatible with the functions provided in VS, and additional dependencies need to be set
Specific solutions are as follows
Add a line of code under #include
#pragma comment(lib, "legacy_stdio_definitions.lib")
2. LNK2019 cannot parse the external symbol _main, which is used in the function “int __cdeclinvoke_main(void)” ([email protected]) is referenced
This is because the program does not have a main function, so the link fails. There are two ways to solve this problem: one is to write a main function as the entry point; The other is in the property page ->; The linker – & gt; On your system, change the first line from /subsytem:console to
/subsystem:windows
3. The arguments of type ‘char *’ participating in type ‘LPCWSTR’ are not compatible.
The argument of type “const char *” is not compatible with the parameter of type “LPCWSTR”.
This is due to the fact that VS2015 uses the Unicode character set. I have tried many methods to solve this problem for a long time, but the most convenient way to solve this problem is in the property page ->; In general, change the character set line from using the Unicode character set to using the multi-byte character set
Read More:
- OpenGL programming error analysis
- Error LNK2019: unresolved external symbol_ Main the symbol is in the function___ Tmaincrtstartup
- Flash back of running program in Visual Studio 2017
- About adding legacy to linker additional dependencies_ stdio_ definitions.lib Solve the problem of incomplete standard library files
- Solution to flash back of visual studio 2017 running program
- Some solutions to the problem of windows flashback after vs running
- LNK2001: unresolved external symbol maincrtstartup
- How to Fix Fatal Error lnk1120: 1 unresolved externals
- Vs compiling OpenGL project, the solution of unable to open the source file “GL / glaux. H” appears
- Solution to the flashback of visual studio output window
- Small problems encountered in compiling OpenGL under VS2010
- How to solve the problem that the console window disappears in a flash after visual studio 2017 runs
- Two problems in OpenGL Programming
- The solution of flashing back after the end of console program running
- Common compatibility problems of VS2010 to vs2017 projects
- [vs console program flashback]
- Vscode debug Java console input: evaluation failed because the thread is not suspended
- Three methods of how to remove the flashback of running result box in VS
- Visual studio 2019 + OpenGL environment configuration
- Three solutions to command line flashback in VS