Issue #83 wontfix

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

Alex Coplan avatarAlex Coplan created an issue

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

==== Building framework (debug) ====
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:

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

    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 . See his comments here 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:

    How he gets them to work in command-line g++ is explained here: 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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.