VS2010 in the process of using glut.lib always link does not pass
The following error occurred:
1>xiaoche.obj:error LNK2019: unresolved external symbol [email protected], which is referenced in the function [email protected]
1>xiaoche.obj:error LNK2019: unresolved external symbol [email protected], which is referenced in the function [email protected]
1>e:\ Project \opengl\xiaoche\debug\xiaoche.exe:fatal Error lnk1120:2 an unresolved external command
There are two solutions:
1, before the #include<gl/glut.h> add
1 #define Glut_disable_atexit_hack
However, every time you encounter a project that uses glut.lib, you have to add it, more trouble!
2. Item---Properties-->--> Configuration Properties-->c/c++--> Preprocessor--preprocessor defines the header plus glut_building_lib; , and then OK.
The following methods are available when you add a Lib file:
1, Mode 1, the program head to add the following statement
1 #pragma
2, Mode 2
Item--Properties-->--> Configuration Properties--linker----add glut.lib on the head, and then OK.
Small problem solution encountered in the project