GL.H 包括在 Glenw.H. 之前
gl.h included before glew.h?
我一直收到此错误"错误 C1189:gl.h 包含在 glew.h 之前",尽管我的包含似乎顺序正确。
我还收到 9 条警告,说"警告 C4005:'APIENTRY':宏重新定义"
我认为值得一提的是,在切换到 GLFW 3 之前我没有收到错误,以前我使用的是 GLFW 2。下面是我的"Core.h"顶部的包含。
//External Libraries
#include <GL/glew.h>
#define GLFW_INCLUDE_GLU
#include <GLFW/glfw3.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
//Default Libraries
#include <cassert>
#include <stdexcept>
#include <cmath>
#include <list>
#include <iostream>
#include <string>
#include <sstream>
#include <windows.h>
我想通了,似乎
发生了什么,我有一个循环依赖,它也包括了两次 glfw。
相关文章:
- 如何确保C++函数在定义之前声明(如override关键字)
- 为什么在定义函数之前先声明它
- Arduino:for/while/if在void setup()或void loop()之前?——错误:之前需要不合格
- 程序在执行程序的其余部分之前退出
- 如何将模板转换为C++11之前的模板
- '||'之前的预期主要表达
- (C++)为什么静态成员可以在初始化之前使用
- 标记 '","' 之前的预期主表达式
- C++的解析器在可以区分比较和模板实例化之前会做什么?
- holeMenuProgram.cpp:38:1 错误:'}'令牌之前的预期主表达式
- 错误:在"生成字符串"之前应为";"
- 为什么C++常量模板化向量在使用之前没有初始化?
- 类的前向声明之后的类成员函数定义,在类声明之前
- 'val' Arduino 错误代码之前的预期'('
- unique_ptr:在分配之前调用 reset 有什么效果
- 语句错误:"","标记之前有"预期的')'
- 在 OpenCV C++ 中估计基本矩阵之前对相应点进行归一化的正确方法是什么?
- 编译 llvm 3.1 时,为什么会出现错误:在">"标记之前预期主表达式
- GStreamer在开始任何播放之前进行搜索
- GL.H 包括在 Glenw.H. 之前