zoukankan      html  css  js  c++  java
  • gl.h报错

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

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

    #include <glglu.h> //GLu32 Header

    时候出现以下错误

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

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

    。。。。。。

    少加了一个头文件:

    #include <windows.h>  //Windows Header
    #include <glgl.h>   //OpenGL Header
    #include <glglu.h>   //GLu32 Header

    或者在预处理器定义添加:WIN32
  • 相关阅读:
    BZOJ 2152 聪聪可可
    hdu 1028 && hdu 1398 && hdu 1085 && hdu 1171 ——生成函数
    bzoj 4827 [Hnoi2017]礼物——FFT
    bzoj 4503 两个串——FFT
    bzoj 3527 [Zjoi2014]力——FFT
    bzoj 3160 万径人踪灭——FFT
    bzoj 2194 快速傅立叶之二
    bzoj 2179 FFT快速傅立叶
    洛谷 3803 【模板】多项式乘法(FFT)
    CF 622F The Sum of the k-th Powers——拉格朗日插值
  • 原文地址:https://www.cnblogs.com/coolbear/p/6081848.html
Copyright © 2011-2022 走看看