关于OpenGL的问题
muzer 2006-10-21 10:04:16 用OpenGL写程序的时候需要包含
#include <GL/gl.h>
#include <GL/glaux.h>
这两个头文件,
但是我程序写好编译的时候在GL.h中总是出现了无数个类似这样的错误:
d:\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1152) : 参见“APIENTRY”的声明
d:\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1167) : error C2144: 语法错误 : “void”的前面应有“;”
d:\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1167) : error C2501: “WINGDIAPI” : 缺少存储类或类型说明符
d:\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1167) : error C2086: “int WINGDIAPI” : 重定义
d:\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1152) : 参见“WINGDIAPI”的声明
d:\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1167) : error C2146: 语法错误 : 缺少“;”(在标识符“glClearStencil”的前面)
d:\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1167) : error C2182: “APIENTRY” : 非法使用“void”类型
d:\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1167) : error C2086: “int APIENTRY” : 重定义
d:\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1152) : 参见“APIENTRY”的声明
d:\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1168) : error C2144: 语法错误 : “void”的前面应有“;”
d:\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1168) : error C2501: “WINGDIAPI” : 缺少存储类或类型说明符
d:\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1168) : error C2086: “int WINGDIAPI” : 重定义
...............................
...............................
...............................
我只有一个CPP文件,也没有重复包含头文件阿,为什么会出现这样的错误;
我用的是Visual Studio .NET 2003.