以下内容摘自:http://blog.csdn.net/kaphen/article/details/24721999

头文件只有
#include <gl\gl.h> //OpenGL Header

#include <gl\glu.h> //GLu32 Header

时候出现以下错误

1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\gl\gl.h(1152): error C2144: 语法错误:“void”的前面应有“;”

1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\gl\gl.h(1152): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\gl\gl.h(1152): error C2146: 语法错误: 缺少“;”(在标识符“glAccum”的前面)
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\gl\gl.h(1152): error C2182: “APIENTRY”: 非法使用“void”类型
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\gl\gl.h(1152): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\gl\gl.h(1153): error C2144: 语法错误:“void”的前面应有“;”
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\gl\gl.h(1153): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\gl\gl.h(1153): error C2086: “int WINGDIAPI”: 重定义
1>          c:\program files (x86)\microsoft visual studio 10.0\vc\include\gl\gl.h(1152) : 参见“WINGDIAPI”的声明
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\gl\gl.h(1153): error C2146: 语法错误: 缺少“;”(在标识符“glAlphaFunc”的前面)
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\gl\gl.h(1153): error C2182: “APIENTRY”: 非法使用“void”类型
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\gl\gl.h(1153): error C2086: “int APIENTRY”: 重定义
1>          c:\program files (x86)\microsoft visual studio 10.0\vc\include\gl\gl.h(1152) : 参见“APIENTRY”的声明
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\gl\gl.h(1153): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\gl\gl.h(1154): error C2146: 语法错误: 缺少“;”(在标识符“GLboolean”的前面)
1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\gl\gl.h(1154): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int

。。。。。。

少加了一个头文件:

#include <windows.h>  //Windows Header
#include <gl\gl.h> //OpenGL Header
#include <gl\glu.h> //GLu32 Header 或者在预处理器定义添加:WIN32

gl.h报错的更多相关文章

  1. OBS---环境配置之#include <D3DX10.h>报错

    一.先贴错误 因为这个笔记主要记录我如何整好这个OBS源码环境的,给需要的童鞋一个参考 1.1.#include <D3DX10.h>  报错 没有这个 解决方案:把2,3先解决了就水到渠 ...

  2. Directx11 xnamath.h 报错

    xnamath.h 报错: 在标识符“XMConvertToRadians”的前面 如下报错 >d:\program files\microsoft directx sdk (june )\in ...

  3. 爬取图片过程遇到的ValueError: Missing scheme in request url: h 报错与解决方法

    一 .scrapy整体框架 1.1 scrapy框架图 1.2 scrapy框架各结构解析 item:保存抓取的内容 spider:定义抓取内容的规则,也是我们主要编辑的文件 pipelines:管道 ...

  4. Oracle EBS GL 会计科目报错 GL_ACCESS_SET_LEDGERS

    1.会计科目设置后,总账中找不到对应账簿                                           2.原因是新版本系统物化视图有问题,参照metalink解决方案得知原路径 ...

  5. apue.h报错问题

    下载apue.3e后进入make,提示错误如下: collect2: error: exit status Makefile:: recipe for target 'badexit2' failed ...

  6. Redis安装过程jemalloc/jemalloc.h报错

    问题: [root@localhost redis-3.0.0]# make cd src && make all make[1]: Entering directory `/data ...

  7. CentOS7.2 yum安装报错

    1.yum源repodata配置文件repomd.xml无法找到: Couldn't open file /mnt/cdrom/repodata/repomd.xml 先找到repomd.xml的路径 ...

  8. vs2013 报错error C1083: 无法打开包括文件:“gl\glew.h”: No such file or directory\

    vs报错诸如如无法打开“gl\xxx.h”时, 解决方法: 1.去http://glew.sourceforge.net/下载相关文件,2.在下载下来的文件里找到xxx.h,将其复制到vs的相关目录下 ...

  9. afxcomctl32.h与afxcomctl32.inl报错

    afxcomctl32.h与afxcomctl32.inl报错 编译公司一个几年前的老项目,是从VC6.0升级到VS2005的. 1.编译时报缺少头文件,于是附件包含目录,于是出现了以下报错: 1&g ...

随机推荐

  1. emmet的使用

    http://blog.wpjam.com/m/emmet-grammar/ 使用 Emmet 生成 HTML 的语法详解 开源程序 浏览:21537 2013年05月09日 文章目录[隐藏] 生成 ...

  2. 数据结构作业——Sanji(优先队列)

    山治的婚约 Description 我们知道,山治原来是地下有名的杀人家族文斯莫克家族的三子,目前山治的弟弟已经出现,叫做四治,大哥二哥就叫汪(One)治跟突(Two)治好了(跟本剧情无关) .山治知 ...

  3. tensorflow学习

    tensorflow安装时遇到gcc: error trying to exec 'as': execvp: No such file or directory. 截止到2016年11月13号,源码编 ...

  4. MongoDB【第三篇】MongoDB基本操作

    MongoDB的基本操作包括文档的创建.删除.和更新 文档插入 1.插入 #查看当前都有哪些数据库 > show dbs; local 0.000GB tim 0.000GB #使用 tim数据 ...

  5. 常见ES5方法

    • ES5 JSON扩展JSON.parseJSON.stringify • ES5 Object扩展Object.createObject.keys • Date对象Date.now • ES5 F ...

  6. js设置鼠标悬停改变背景色

    看了网上那么多的js鼠标悬停时事件,大多数的,说了那么多话,也没解决什么问题,现在直接贴上代码,以供参考 html: <div id="sign">this is te ...

  7. 如何查看编译安装的lnmp环境各自的配置参数

    安装好后如何查看mysql/apache/nginx/php安装参数   查看mysql编译参数: cat /usr/local/mysql/bin/mysqlbug | grep CONFIGURE ...

  8. 移动开发框架剖析(二) Hammer专业的手势控制

    浏览器底层并没有给元素提供类似,单击,双击,滑动,拖动这些直接可以用的控制接口,一切的手势动作都只能通过模拟出来.移动端浏览器唯一给我们提供的就只是mousedown -> mousemove ...

  9. PJAX的实现与应用

    一.前言 web发展经历了一个漫长的周期,最开始很多人认为Javascript这们语言是前端开发的累赘,是个鸡肋,那个时候人们还享受着从一个a链接蹦 到另一个页面的web神奇魔术.后来随着JavaSc ...

  10. 一些关于angularJS的自己学习和开发过程中遇到的问题及解决办法

    这篇文章也许会不定时更新,主要记录这段时间内自己遇到的angularjs学习开发的一些问题的解决办法.本文以摘抄为主,主要目的还是将自己遇到的困惑在各个地方查到的解决办法的汇总,给自己留个备忘吧. 1 ...