Reputation: 1139
I'm currently trying to follow the OpenGL intro guide here. I've pulled the finished project straight from the git repo on the site into a new Xcode project, but upon trying to build and run I get a "GL/glew.h: No such file or directory".
I've downloaded glew from the site, and run "make" and "make install". I can see 3 libGLEW files in /usr/lib, and 3 header glew related header files in /usr/include/GL. This all leads me to believe it's installed fine.
Following a couple of ideas from googling, I tried adding the /usr/lib and /usr/include/GL paths to the relevant search paths in the project info, but that still gave the same problem. I also tried adding "-lGLEW" to the 'Other Linker Flags' option.
The include in the C source is simply
#include <GL/glew.h>
What am I missing?! Thanks for any help
Accepted answer works, the recursive box in XCode also needs to be checked.
Upvotes: 3
Views: 2946
Reputation: 78363
If you #include
it using #include
then the search path has to be simply /usr/include
. Try adding /usr/include
to your header search paths in your Xcode project and then it should be able to find the header.
Upvotes: 1