1. 在使用OpenGL时出现error C2381:exit: 重定义;__declspec(noreturn)不同这个错误.
方法:把glut.h放在windows.h,iostream等的后面问题就解决。
2. : error LNK2019: 无法解析的外部符号 ___glutInitWithExit@12,该符号在函——glutInit_ATEXIT_HACK@8 中被引用。
方法:glut.h的注释竟然就写着如下内容: Note that the __glut*WithExit routines should NEVER be called directly. To avoid the atexit workaround, #define GLUT_DISABLE_ATEXIT_HACK.
所以在#include <GL/glut.h>前面加上了一句:#define GLUT_DISABLE_ATEXIT_HACK
3.fatal error LNK1281: 无法生成 SAFESEH 映像。
解决方法:1.打开该项目的“属性页”对话框。2.单击“链接器”文件夹。3.单击“命令行”属性页。4.将