Xcode OpenGL Build Error (header file not found)
- by Strix Nebulosa
When building my Objective-C project (for Mac OS 10.9, Xcode 5.11), I get the error message
Lexical or Preprocessor Issue 'OpenGL/OpenGL.h' file not found.
The error is caused by the include section of the file CVDisplayLink.h where the above named file is included. CVDisplayLink.h belongs to the framework CoreVideo. Now there are two strange points related to that issue:
The error appeared after I tried to test some basic OpenGL features using the tutorial in the Mac Developer Library ( https://developer.apple.com/library/mac/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_drawing/opengl_drawing.html#//apple_ref/doc/uid/TP40001987-CH404-SW8 ).
I added an NSOpenGLView to my MainMenu as well as the related code given in the tutorial. Then the error message appeared. I also tried to add the OpenGL and CoreVideo frameworks to my project target, but this did not help.
After some frustration, I removed the NSOpenGLView from my project, as well as all related code. Now the error Message still appeares and I have no Idea how to ged rid of it.