PDA

View Full Version : xcode can't find GL/gl.h


Rasterman
2007.09.28, 05:36 PM
I have an xcode project, and have added Cocoa, GLUT, OpenGL, QuickTime, Carbon, CoreServices, and ApplicationServices frameworks. When I include <GLUT/glut.h> xcode cannot find <GL/gl.h> and <GL/glu.h> which are on lines 137 and 138 in glut.h. I must have something configured wrong in xcode?

When I include <OpenGL/gl.h> and <OpenGL/glu.h> directly above <GLUT/glut.h> in my main program it finds them fine, but I still get the error as I need glut as well, should I just create a whole new project, or does anyone have any ideas how to fix this?

(I also tried adding the gl.h path directly to my "User Header Search Path" project setting, but that didn't help.)

Nick
2007.09.28, 06:35 PM
This should help you out: http://onesadcookie.com/Tutorials/

OneSadCookie
2007.09.28, 06:42 PM
<GLUT/glut.h> shouldn't be asking for <GL/gl.h>. Sounds like you've configured something wacky...

Rasterman
2007.09.28, 09:27 PM
I found the problem, because of a user include path xcode is pulling in a glut.h where lines 137 and 138 are including <GL/gl.h> and <GL/glu.h>, but if I view the glut.h under the GLUT framework, it is different and includes <OpenGL/gl.h> and <OpenGL/glu.h>.