GL.H 包括在 Glenw.H. 之前

gl.h included before glew.h?

本文关键字:之前 Glenw 包括 GL      更新时间:2023-10-16

我一直收到此错误"错误 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。