Error message GL/glew.h file not found

I am getting an error (see image attached) when trying to run the code in OF 7 that I am trying to use from this forum post: http://forum.openframeworks.cc/t/grabbing-from-the-screen-osx/2946/0 from zach’s sample code to grab from the screen: http://visiblevisible.org/deliver/OF/screenGrabExample.zip

I changed the SDK to mac osx 10.6 (even though Zach writes “I’ve uploaded the app - but to compile this code, you’ll need to compile for 10.5 and also, add the appkit framework.”).

I’m getting the error “GL/glew.h file not found” . I tried to change the header search path to include the path /Users/administrator/Documents/of_preRelease_v007_osx/libs/openFrameworks/utils where ofConstants.h is, but that doesn’t work.

I’m wondering if there is anyone having a similar issue who knows how to resold this error. Thanks

![](http://forum.openframeworks.cc/uploads/default/2126/Screen shot 2012-01-28 at 2.48.41 PM.png)

Try adding the AppKit framework. In XCode 4 it’s an option in the Build Phases. And copy / drag the macGlutfix files into the source file.

I have the same error. AppKit is already in build phases. OpenGL as well… Seems this only started happening after upgrading to Xcode 4.2 (from 4.1 I believe, or maybe 4.0.1…?)

That example project was probably set up in 0062 or below. Haven’t tried this but it should work…

  • duplicate the emptyExample project in 007

  • replace (and add) the files from the src directory in the 0062 project to the src directory in the 007 project

  • open the 007 project and add in the extra two files and the framework

yes, this happened to me yesterday. nothing would compile all of the sudden. decided to reinstall OF. things worked fine after that.

I’m having this problem with xCode 4.3, has anyone found a solution?

You can definitely fix this by following the steps mentioned by @neilmendoza.

I always follow these steps whenever I want to run an older OF project on OF 007.

**Update:
Solved: instead of download the Github version, downloaded the release version from the website; This works perfectly here. **

"Hello everyone,

I am having the same issue. This is the situation:

• Downloaded most recent OF version from Github today
• Downloaded most recent xCode (4.5.1)
• On a Mac with 10.8 (sometimes switch to other mac with 10.7)

Then I did this:

A) Copied one of the .xcodeproj from the devApps folder to emptyExample folder to run emptyExample:
‘GL/glew.h’ file not found

B) Created a new project using projectGenerator. Opening the newly created .xcodeproj gave: “cannot be opened because it is missing its project.pbxproj file.”

So I am not using older versions files in the new oF - What should I do to run oF?
Thank you for your help."

I know this is a super ancient post, but I ended up here through Google today and thought it might happen to someone else:

In my case, the problem turned out to be that I had run the wrong download_libs.sh (for an oF install from git master.) Re-running the correct download_libs.sh fixed it.

And if anyone wants to know where the download_libs.sh script is, you’ll find it in openFrameworks/scripts/osx/. This solution helps fix the “GL/glew.h file not found” problem in the most recent ofx 0.9.8 and 0.10.0 running on macosx and xcode 8.

3 Likes

For folks with this problem in 2020. I didn’t have wget installed on my Mac so the bash script never downloaded any files. brew install wget and re-run openFrameworks/scripts/osx/download_libs.sh did the trick.

1 Like

It looks like a change has been made to fallback to using curl for fetching packages if wget is not available.

I had downloaded the zip file from the downloads page for osx on OpenFrameworks site and was trying to manually run the download_libs.sh file. Still was encountering issues.

I instead just downloaded OF from the github page and followed the INSTALL_FROM_GITHUB.md instructions and did not have any further issues.

1 Like