1. Compile-time prompts
“Error C2381: ‘exit’ : redefine; __declspec(noreturn) different “error
“Error C2381: ‘exit’ : redefine; __declspec(noreturn) different “error
#include <; #include <; GL/glut.h>
# include & lt; stdlib.h>
:
include
:
#include
stdlib.h>
# include & lt; GL/glut.h>
to go through.
enGL and C++ have a bit of an incongruence. Include the standard C++ library header before the GLUT graphics library header.
2. Compile passed, runtime prompt
(1) ERROR LNK2019: Unable to resolve the external symbol __imp____glutInitWithExit@12, which is referenced in the function _glutInit_ATEXIT_HACK@8
(2) ERROR LNK2019: Unable to resolve the external symbol __imp____glutCreateWindowWithExit@8, which is referenced in the function _glutCreateWindow_ATEXIT_HACK@4
Solution:
The # include & lt; GL/glut.h> He added:
# define GLUT_DISABLE_ATEXIT_HACK
(!!!!!! Attention, the front!!)
Read More:
- Configuration of OpenGL development environment under Windows environment, win10 + vs2019 + glfw + glad
- OpenGL environment configuration under VS2010 / vs2012 / vs2015
- Construction of vs2015 OpenGL configuration environment
- Vs2015 OpenGL environment configuration
- Vs2015 + OpenGL environment configuration
- Problems encountered in vs2015 configuration using OpenGL environment
- OpenGL class library and environment configuration under win10 and vs2015
- On the configuration of OpenGL Red Book eighth edition environment in vs2013
- Configuring OpenGL in Chinese version of VS2010 and problem solving
- Vs configuration of OpenGL development environment: configuration of glfw library and glad Library
- Simple configuration of glfw + glad in vs2015 OpenGL development environment
- Vs2015 configuring OpenGL development environment: configuration of glfw library and glad Library
- OpenGL environment configuration
- Configure OpenGL development environment (vs2015)
- Configuration of OpenGL in VS2010
- Problem solving – vs debugging window flash solution
- (64 bit) OpenGL configuration + vs2017 + glew + glfw
- Vs2013 + glfw + glew configure OpenGL development environment
- OpenGL development environment configuration [vs2017] + common problems
- Environment configuration at the beginning of OpenCV + vs2015