为什么定义这个语句显示出错?可能是什么原因?

来源:百度知道 编辑:UC知道 时间:2024/09/28 11:26:37
GLuint m_texture;
错误提示:
--------------------Configuration: bishe - Win32 Debug--------------------
Compiling...
FaceImage.cpp
c:\documents and settings\administrator\桌面\bishe\faceimage.h(20) : error C2146: syntax error : missing ';' before identifier 'm_texture'
c:\documents and settings\administrator\桌面\bishe\faceimage.h(20) : error C2501: 'GLuint' : missing storage-class or type specifiers
c:\documents and settings\administrator\桌面\bishe\faceimage.h(20) : error C2501: 'm_texture' : missing storage-class or type specifiers
执行 cl.exe 时出错.
Creating browse info file...
opengl模块库已经添加了。

可能在2146那行少了一个;

GLuint 这个类型没有定义的原因

在头文件的类声明上面写上这么一句:
class GLuint;
如果不行就包含GLuint的头文件。

你没有#include <gl/gl.h>