Error 1 C2381: “exit” : redefinition; __declspec(noreturn) “This type of error is caused by the wrong order of reference header files,
Solutions:
Switch the inclusion order of the header file:
#include < GL/glut.h>
#include < stdlib.h>
#include p>
stdlib.h>
#include < GL/glut.h>
Refer to the link https://www.cnblogs.com/rainbow70626/p/10732342.html
two
E:\OPENGL_Project\lightwithView\lightwithView\lightInViewSpace. Obj lightwithView”
“Error 13 error LNK2019: Cannot resolve external symbol __imp__glClearColor@16, which is referenced in function _main E:\OPENGL_Project\lightwithView\ lightWithview \ lightinViewSpace. Obj lightwithView”
Glew32s.lib is a static library, not a dynamic library, so Glut. h is added.
#include < GLEW/glew.h> It must be preceded by #define GLEW_STATIC
three
LINK: warning LNK4098: default library ‘MSVCRT’ conflicts with other libraries Please use/NODEFAULTLIB: the cause of the library “is trying to incompatible library links, such as SOIL link libraries, originally provided by the website is libSOIL. A file, but directly use the static library files may output of the error, and error” unparsed external symbol __alloca in function _stbi_zlib_decode_noheader_buffer reference “, this time as long as the SOIL’s own project on its own compiler to generate the corresponding SOIL. The lib files, Replace libsoil. LIB file, problem solved!
https://blog.csdn.net/iscassucess/article/details/8302264 this link explain more clearly, you can refer to.
Read More:
- OpenGL learning — problems encountered in compiling OpenGL program for the first time
- Summary of problems encountered in compiling and installing vtk7 + vs2013 / 2015 + cmake
- Small problems encountered in compiling OpenGL under VS2010
- Summary of problems encountered by CodeBlocks + OpenGL
- Summary of problems encountered in using OpenGL in QT
- OpenGL Usage Summary (including problems encountered and solutions)
- Problems encountered in vs2015 configuration using OpenGL environment
- Record the problems encountered in OpenGL learning
- Problems encountered in running OpenGL
- Problems encountered in configuring OpenGL development environment in vs2015
- Configuration of OpenGL under CodeBlocks and solutions to problems encountered
- A strange problem in compiling OpenGL program
- Two problems in OpenGL Programming
- Compiling QT project under vs encountered “error 89error msb6006:“ cmd.exe ”Exited with code 3
- Problems in compiling and using node FFI under electron
- A series of problems in configuring OpenGL development environment in vs2015
- Some configuration problems of OpenGL in VS2008
- Problems encountered in VS2010 compilation
- Ionic1 compiling IOS encountered * * archive failed * * cordovaerror: promise rejected with non error: ‘error code 65 f
- Problems in compiling VTK with cmake: solutions to error configuration process, project files may be invalid