my.cpp
文件具有#import <OpenGLES/ES2/glext.h>
。我試圖通過g++ -c my.cpp
進行編譯,其失敗fatal error: 'OpenGLES/ES2/glext.h' file not found #import <OpenGLES/ES2/glext.h>
MACOS命令行編譯克++ OpenGL ES的cpp文件
我能夠從Xcode與GLKit.framework
編譯它。如何從命令行在macOS中編譯它?
- 編輯 -
Where are the OpenGL header files located on MacOSX?似乎相關,但它是OpenGL
。我找OpenGL ES
的包括由Xcode中所示的路徑
,但在文件系統中我無法弄清楚它的位置與編譯器的-I
選項
是'OpenGLES/ES2/glext.h'在一個地方,編譯器會尋找?一些很好的閱讀:http://stackoverflow.com/questions/344317/where-does-gcc-look-for-c-and-c-header-files – NathanOliver
不知道它的路徑。我已經編輯把它 – neckTwi
我想你可以框架的名字傳遞給它也'-framework OpenGLES' ... –