Tag Archives: Link problem

Two problems in OpenGL Programming

Error C2381: ‘exit’ : redefinition; error C2381: ‘exit’ : redefinition; error C2381: ‘exit’ : redefinition; __declspec (noreturn) differs. The solution to the problem is to include the #include< stdlib.h> On the # include & lt; gl\glut.h> Just before.

Error LNK2001: unresolved external symbol __imp____glutInitWithExit@12 Unresolved external symbol __imp____glutInitWithExit@12 Unresolved external symbol __imp____glutInitWithExit@12 Unresolved external symbol __imp____glutInitWithExit@12 Unresolved external symbol __imp____glutInitWithExit@12 Unresolved external symbol __imp____glutInitWithExit@12 Unresolved external symbol __imp____glutInitWithExit@12 Unresolved external symbol __imp____glutInitWithExit@12 Unresolved external symbol __imp____glutInitWithExit@12 Unresolved external symbol __imp____glutInitWithExit@12 Unresolved external symbol __imp____glutInitWithExit@12

#define GLUT_DISABLE_ATEXIT_HACK

It is estimated that the reason for the above problem is the repeated definition problem.