OpenGL的gl.h出现一堆错误,如重定义什么的

问题:生成时提示 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>

参考

原文地址:https://www.cnblogs.com/VVingerfly/p/7282776.html