以下内容摘自: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. CUDA[1] Introductory

    Section 0 :Induction of CUDA CUDA是啥?CUDA®: A General-Purpose Parallel Computing Platform and Program ...

  2. python3安装lxml(windows)

    爬虫时通常要安装LXML,对于通过一下命令行 1 pip install lxml 出现如下错误的解决方法 1 lxml Unable to find vcvarsall.bat 1. 安装wheel ...

  3. TypeScript 素描-变量声明

    博文读自 TypeScript 官方文档而来,不具有学习性,仅是本人学习时记录以供日后翻阅 ,有学习TypeScript的朋友还请去看更为详细的官方文档 /* 变量声明在之前的js中一直是使用var关 ...

  4. sql 批量插入数据到Sqlserver中 效率较高的方法

    使用SqlBulk #region 方式二 static void InsertTwo() { Console.WriteLine("使用Bulk插入的实现方式"); Stopwa ...

  5. php程序 注册机制

    密码加密方式 1.直接md5加密 2.md5和随机数(也可以是固定参数,如(Rfd4WE784)) 3.md5(md5) 4. 参考 function sp_password($pw,$authcod ...

  6. 关于JSP中<body onload="fun()">body标签中onload中函数不执行问题

    问题描述: 在一个页面中,我们经常会初始化一下数据,而且会在指定的DOM元素初始化数据,这时候我们就会使用<body onload="fun()">来加载我们的数据.o ...

  7. xml中处理大于小与符号

    原符号   <    <=    >    >=     &      '       " 替换符号 < <= > >= & ...

  8. MySql简易配置

    选择standard configuration ,然后next Service Name :服务名字 Launch the MySQL Server automatically:是否开机启动mysq ...

  9. java解析xml的三种方法

    java解析XML的三种方法 1.SAX事件解析 package com.wzh.sax; import org.xml.sax.Attributes; import org.xml.sax.SAXE ...

  10. java.lang.ClassNotFoundException: com.mysql.jdbc.Driver解决办法

    这个问题的原因是没有导入mysql连接库,我从官网上下载后照着网上的教程各种导入无果,最后发现是我导入的文件错了.... 官网上下下来的压缩文件是这个,不过这并不是直接要导入的文件,首先解压文件,然后 ...