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)” (?invoke_main@yahxz) 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:
- A series of problems in configuring OpenGL development environment in vs2015
- Problems encountered in configuring OpenGL development environment in vs2015
- Some problems and solutions in learning opengl in vs2017
- Configuring OpenGL in VS
- The solution of configuring OpenGL in vs2017
- Problems in configuring OpenGL
- Small problems encountered in compiling OpenGL under VS2010
- The simplest course of configuring OpenGL in vs2015
- Configuring OpenGL in Chinese version of VS2010 and problem solving
- Problems and solutions in learning opengl
- Some configuration problems of OpenGL in VS2008
- Solutions to some problems encountered in programming with vs2017
- Vs2015 configuring OpenGL (glfw Library)
- Vs2015 configuring OpenGL (glfw, glew)
- Configuring OpenGL development environment in win10 + vs2015 (including the method of installing 32-bit and 64 bit libraries)
- Problems encountered in vs2015 configuration using OpenGL environment
- OpenGL learning notes: Problems and Solutions
- Vs2019 nuget configuring OpenGL
- Configuring OpenGL with vs2019
- Configuration of OpenGL under CodeBlocks and solutions to problems encountered