Error Building freeglut - 'GL/gl.h' not found

Issue #83 wontfix
Alex Coplan
created an issue

Inside the project root I ran premake4 gmake followed by make config=debug, and got this error:

{{{ ==== Building framework (debug) ==== framework.cpp In file included from framework.cpp:17: In file included from ../glsdk/freeglut/include/GL/freeglut.h:17: ../glsdk/freeglut/include/GL/freeglut_std.h:120:10: fatal error: 'GL/gl.h' file not found

include <GL/gl.h>

     ^

1 error generated. make[1]: [lib/Debug/framework.o] Error 1 make: [framework] Error 2 }}}

So I decided to try and build the glsdk:

{{{ cd glsdk premake4 gmake make config=debug }}}

And I got this:

{{{ freeglut_callbacks.c In file included from src/freeglut_callbacks.c:28: In file included from include/GL/freeglut.h:17: include/GL/freeglut_std.h:120:10: fatal error: 'GL/gl.h' file not found

include <GL/gl.h>

     ^

1 error generated. make: *** [obj/Debug/freeglut_callbacks.o] Error 1 }}}

Why can't it find that file?

I'm running OS X 10.7.4.

Comments (3)

  1. Jason McKesson repo owner

    Thanks you for the bug report.

    Unfortunately, my tutorials and build system do not support MacOS X at this time. It may be possible to get them to run on this OS, but I don't know how to do that.

    Sorry for the inconvenience.

  2. Roger Wehage

    I'm having the same problems running on OS X 10.8.2. However, I am able to run the examples on http://lazyfoo.net/tutorials/OpenGL/index.php . See his comments here http://lazyfoo.net/tutorials/OpenGL/01_hello_opengl/mac/index.php on getting freeglut to work on a Mac. The include file LOpenGL.h in his OpenGL examples contains

    include <GL/freeglut.h>

    include <GL/gl.h>

    include <GL/glu.h>

    include <stdio.h>

    and they work for me in Xcode4.

    How he gets them to work in Xcode4 is explained here: http://lazyfoo.net/tutorials/OpenGL/01_hello_opengl/mac/xcode/index.php

    How he gets them to work in command-line g++ is explained here: http://lazyfoo.net/tutorials/OpenGL/01_hello_opengl/mac/cli/index.php However, I didn't try this method.

    Based on Lazy Foo's discussion in these links, I believe the build program cannot find the absolute path to your installed version of freeglut, so it can't find GL/gl.h, which Lazy Foo's example programs obviously do. See in Lazy Foo's description how he sets the absolute path to freeglut.

  3. Log in to comment