问题:生成时提示 gl.h中出现一堆错误,如

error C2144: 语法错误 : “void”的前面应有“;”
error C2182: “APIENTRY” : 非法使用“void”类型
error C2086: “int APIENTRY” : 重定义
error C2146: 语法错误 : 缺少“;”(在标识符“glClearStencil”的前面)

 

 

解决办法:

#include <GL/gl.h>
#include <GL/glut.h>

前面加上

#include <windows.h>

 

参考

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-19
  • 2022-01-19
  • 2022-12-23
  • 2022-02-06
  • 2021-08-07
  • 2022-12-23
猜你喜欢
  • 2021-09-01
  • 2021-10-28
  • 2021-12-27
  • 2021-05-25
  • 2022-12-23
  • 2023-03-24
相关资源
相似解决方案