Problem with GL in xcode

Please help me here in xcode app it shows an error in ‘GL/glut.h’ file not found What is the solution?on MacBook Air

Did you link the install of Glut with the application? Go into Xcode and select [Application]->[Build Phases]->[Link Binary with Libraries] and add the Glut or Glue install.

Honestly, though, if you're doing any sort of C++ OpenGL development you should go through Cmake to build Xcode files for you. I found linking C++ libraries in Xcode to be laborous.

Where do I get a library from GLUT?

OpenGL support was retired back around macOS 10.14.

Various of the GL support was retired back around OS X 10.9, and GLUT (OpenGL Utility Toolkit) was then used.

How much code-level work do you want to do here?

You can try setting your deployment target version back in Xcode. Maybe that gets you working?

Or can make some code changes: maybe one or the other of the following helps pick up the necessary GL definitions:

#include <GLUT/glut.h>

#include <OpenGL/gl.h>
Problem with GL in xcode
 
 
Q