Opengl编程时遇到问题

xhz1234 2011-08-22 07:14:25
我的程序用VS2008,在Debug模式下运行很好。然而,到了release模式下报错,如下:
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\GL/gl.h(1152): error: this declaration has no storage class or type specifier
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\GL/gl.h(1152): error: expected a ";"
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\GL/gl.h(1153): error: this declaration has no storage class or type specifier
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\GL/gl.h(1153): error: variable "WINGDIAPI" has already been defined
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\GL/gl.h(1153): error: expected a ";"
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\GL/gl.h(1154): error: variable "WINGDIAPI" is not a type name
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\GL/gl.h(1154): error: "GLboolean" has already been declared in the current scope
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\GL/gl.h(1154): error: expected a ";"
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\GL/gl.h(1155): error: this declaration has no storage class or type specifier
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\GL/gl.h(1155): error: variable "WINGDIAPI" has already been defined
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\GL/gl.h(1155): error: expected a ";"
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\GL/gl.h(1156): error: this declaration has no storage class or type specifier
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\GL/gl.h(1156): error: variable "WINGDIAPI" has already been defined
这是什么原因啊!?
...全文
831 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
Yaho_soar 2013-12-10
  • 打赏
  • 举报
回复
是在哪里添加 头文件<windows.h> 呢
xhz1234 2012-01-28
  • 打赏
  • 举报
回复
找到了,缺少头文件<windows.h>
xhz1234 2011-09-10
  • 打赏
  • 举报
回复
可能是路径配置的问题,还没找到
stephanie_86 2011-09-06
  • 打赏
  • 举报
回复
楼主找到原因了吗?我也遇到了相同的情况,不知道怎么办?

231

社区成员

发帖
与我相关
我的任务
社区描述
CUDA on Windows XP
社区管理员
  • CUDA on Windows XP社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧