GLUT出现无法解析符号

来源:互联网 发布:linux入门教程 pdf 编辑:程序博客网 时间:2024/04/30 22:21

出现无法解析符号:

  1. 1>GEARS.obj : error LNK2019: 无法解析的外部符号 ___glutInitWithExit@12,该符号在函数 _glutInit_ATEXIT_HACK@8 中被引用   
  2. 1>GEARS.obj : error LNK2019: 无法解析的外部符号 ___glutCreateWindowWithExit@8,该符号在函数 _glutCreateWindow_ATEXIT_HACK@4 中被引

      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   

原创粉丝点击