but I’m getting an error that says “no such file: glew.h”. How do you guys compile OpenGL with g++? thanks.[/QUOTE]
You’re doing it right. The issue is probably that your system doesn’t have the GLEW header files installed. Typically, headers are in a “*-devel” package.
For example, GLEW headers would be in a separate “glew-devel” package, where as the glew library itself is in the “glew” package. Here:
> ls /usr/include/GL/glew.h
/usr/include/GL/glew.h
> rpm -qf /usr/include/GL/glew.h
glew-devel-1.9.0-5.1.2.x86_64
Right. Or -Iinclude/GL. You may also need to change #include <glew.h> to #include “glew.h” as well. <> means to look in the system include directories, and “” means to look in user-specified directories (basically), though the <> is up to the compiler.
Typically headers like glew.h would be installed system-wide in system include directories, so you’d use <>. But you’re not doing that.