OpenGL + vs2015 environment configuration problem solving

1. Compile-time prompts
“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: