2012-04-07 2 views
0

나는 Mac OS X에서 glv을 빌드하려고합니다. 나는이 운영체제에 익숙하지 않으며 오류를 발견 할 수 없다. 충돌하는 명령은 다음과 같습니다OS X에서 GLV를 빌드 할 때 "OpenGL.h를 찾을 수 없습니다"?

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 

이 오류 트리거 라인이 들어있는 파일 : 나는 맥 OS X 10.7.3를 실행하는거야 https://svn.mat.ucsb.edu/svn/glv-svn/trunk/GLV/glv_conf.h

합니다. 내가 실행하는 경우

내가 얻을 '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 
+2

'OpenGL/gl.h'이 아니어야합니까? :( –

답변

0

실제로 두 가지 오류가있었습니다. 첫 번째는 '-c'플래그가 누락되었다는 것입니다 (이 파일은 라이브러리의 일부 였기 때문에 링크 할 필요가 없었습니다). 이 플래그를 추가 한 후에는 -isysroot 및 -arch 옵션을 제거하고 모든 것이 작동했습니다.

3

빌드 명령에 -framework OpenGL를 추가합니다.

관련 문제