0

我正在尝试在 mac os x 上构建glv 。我是这个操作系统的新手,我找不到错误。有冲突的命令是:

c++ -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -stdlib=libc++ -I/usr/include -IGLV  src/glv_buttons.cpp

输出

clang: warning: argument unused during compilation: '-fpeel-loops'
In file included from src/glv_buttons.cpp:4:
In file included from GLV/glv_buttons.h:7:
In file included from GLV/glv_core.h:13:
In file included from GLV/glv_draw.h:9:
GLV/glv_conf.h:72:11: fatal error: 'OpenGL/OpenGL.h' file not found

这是包含触发错误的行的文件:https://svn.mat.ucsb.edu/svn/glv-svn/trunk/GLV/glv_conf.h

我正在运行 mac os x 10.7.3。

如果我运行“定位 OpenGL.h”,我会得到:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSOpenGL.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/OpenGL.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSOpenGL.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/OpenGL.h
/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSOpenGL.h
/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/OpenGL.h 
4

2 回答 2

3

添加-framework OpenGL到构建命令。

于 2012-04-07T07:48:29.033 回答
0

实际上有两个错误。第一个是我缺少“-c”标志(这个文件不需要链接,因为它是库的一部分)。添加此标志后,我删除了 -isysroot 和 -arch 选项,一切正常。

于 2012-04-10T07:47:45.880 回答