openGl-包含143个错误 [英] openGl - 143 errors from the includes

查看:101
本文介绍了openGl-包含143个错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual C ++ 2008 Express Eition在Windows XP上工作. 我正在尝试包括:

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'

我的问题是:我可以使用这些包含项吗?还是一开始需要从某个地方获取这些库? 谢谢.

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

推荐答案

仅出于Microsoft已知的原因,各种Windows SDK随附的OpenGL标头要求您

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

#include <windows.h>

之前.

这篇关于openGl-包含143个错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆