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' ... –