I'm having trouble linking the GLEW library with my Xcode project

I am currently trying to follow the OpenGL installation guide here . I pulled the finished project directly from the git repository to the site in a new Xcode project, but trying to build and run, I get "GL / glew.h: There is no such file or directory."

I downloaded glew from the site and ran "make" and "make install". I can see 3 libGLEW files in / usr / lib and 3 header header files in / usr / include / GL. All this makes me think that it is installed normally.

Following a few ideas from googling, I tried adding the paths / usr / lib and / usr / include / GL to the appropriate search paths in the project information, but this still gave the same problem. I also tried adding "-lGLEW" to the "Other linker flags".

Include in source C simply

#include <GL/glew.h>

What am I missing ?! Thanks for any help

The accepted answers work, you also need to check the recursive block in Xcode.

+3
source share
1 answer

If you #includeuse #include , then the search path should be simple /usr/include. Try adding a /usr/includetitle to your search paths in your Xcode project, and then it can find the title.

+1
source

Source: https://habr.com/ru/post/1750721/