尝试为我正在处理的 c++ SFML 项目制作/链接 Box2D 库。
这是我所做的: 从 github ( https://github.com/erincatto/Box2D ) 下载一个新的 Box2D 源
cd Box2D-master/Box2D/Build
cmake ..
制作
它走到一半,然后到达
[ 68%] 构建 C 对象 glfw/CMakeFiles/glfw.dir/egl_context.c.o
它吐出一堆错误,例如
/Users/wstone/Documents/Box2D-master/Box2D/glfw/egl_context.c:53:35:错误:未知类型名称“EGLint”;您指的是 'GLint' 吗?
static const char* getErrorString(EGLint 错误)
^~~~~~
闪烁
/System/Library/Frameworks/OpenGL.framework/Headers/gltypes.h:15:18: 注意:'GLint' 在这里声明
typedef int32_t GLint;
^
/Users/wstone/Documents/Box2D-master/Box2D/glfw/egl_context.c:57:14:错误:使用未声明的标识符“EGL_SUCCESS”
案例 EGL_SUCCESS:
^
/Users/wstone/Documents/Box2D-master/Box2D/glfw/egl_context.c:59:14:错误:使用未声明的标识符“EGL_NOT_INITIALIZED”
有人有什么见解吗?我用 brew install cmake
安装了 cmake,如果这很重要的话
最佳答案
我也有同样的问题,Box2d Master 没有稳定的构建,请尝试使用以下链接中的发布构建
关于c++ - 在 Mac OS 上编译 Box2D 时出错 : EGL identifiers not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33808725/