开发者

openGl - 143 errors from the includes

I'm working on windows XP with Visual C++ 2008 Express Eition. Im trying to include:

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

and getting alot of errors like:

1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : error C2146: syntax error : missing ';' before identifier 'glAccum'
1>c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : error开发者_运维知识库 C2182: 'APIENTRY' : illegal use of type 'void'

etc.

My question is: can i use those includes or do i need to get those libraries from somewhere at first? Thanks.


For reasons known to Microsoft only, the OpenGL headers provided with the various Windows SDKs require that you

#include <windows.h>

before.


You are probably trying to compile it as C++ instead of C, or something along those lines.


Why are you using SDKs named 'v6.0a' with VC++2K8? Are you sure that's the latest OpenGL headers you have? You should be using latest Platform SDK and OpenGL headers whenever possible.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜