我必须假设SDL在某个地方包含了gl.h,因为我的唯一包含如下所示:/System/Library/Frameworks/OpenGL.framework/Headers/gl.h:5:2: 警告: #warning gl.h and gl3.h are both included. Compiler will not invoke errors if using removed OpenGL functionality. [-Wcpp]
#define GL3_PROTOTYPES
#include <OpenGL/gl3.h>
#include <SDL2/SDL.h>
虽然我可以简单地忽略这一点,但当我意外使用核心配置文件中不可用的枚举值时,它已经导致了一个难以发现的bug。有没有办法防止包含gl.h文件?
__gl_h_
会引起一些问题,但这是一个单独的问题。我将直接从他们的社区中寻找相关信息。 - Karl