2017-04-26 11 views
1

ファイルのファイル名は#import <OpenGLES/ES2/glext.h>です。コンパイルしようとしていますfatal error: 'OpenGLES/ES2/glext.h' file not found #import <OpenGLES/ES2/glext.h>macOSコマンドラインをコンパイルするg ++ OpenGL ES .cppファイル

GLKit.frameworkでXcodeからコンパイルできます。どのようにコマンドラインからmacOSでコンパイルするのですか?

--EDIT--

Where are the OpenGL header files located on MacOSX?関連すると思われるが、それはOpenGLにあります。私はOpenGL ES

を探していますザ・はXcodeので示す経路を

enter image description here

されているが、私は、コンパイラの-Iオプション

+0

はOpenGLES/ES2/glext.h'場所でコンパイラが探します 'ですか?いくつかの良い読書:http://stackoverflow.com/questions/344317/where-does-gcc-look-for-c-and-c-header-files – NathanOliver

+0

それのパスを知らない。私はそれについての質問を編集しました – neckTwi

+0

フレームワークの名前を '-framework OpenGLES'に渡すことができると思います... –

答えて

1

キーで使用するファイルシステム内の位置を把握することができませんでし含ま解決にはOpenGLESの場所を指定します:

g++ -c my.cpp -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhon‌​eOS.platform/Develop‌​er/SDKs/iPhoneOS10.3‌​.sdk/System/Library/‌​Frameworks -framework OpenGLES 

The -F flag indicates the library location, and -framework indicates which framework to use.

技術的-isysrootも同様に仕事ができる:

g++ -c my.cpp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhon‌​eOS.platform/Develop‌​er/SDKs/iPhoneOS10.3‌​.sdk 
+0

thats私が探しているものです。 – neckTwi

関連する問題