View Full Version : compiling issue - Ubuntu -> Eclipse

12-14-2008, 10:51 PM
Hi All,
I just yesterday installed ubuntu on my pc (now I have dual boot with Vista - where open GL works without problem) and when I want to compile one openGL program the compiler can not find open GL. This is what I get on every openGL function (the variable is different):

Description Resource Path Location Type
‘GL_COLOR_BUFFER_BIT’ was not declared in this scope openGLtest.cpp openGLtest/src 28 C/C++ Problem

please where can I define it?

12-15-2008, 01:23 AM
#include <GL/gl.h>

12-15-2008, 01:59 AM
thanks for the reply but that does not work. Should I include it also in a project? (Glut have already included..)

12-15-2008, 02:06 AM
you should make sure the path to GL directory is known. can be either hardcoded or setup in project settings (include directories).
you could test some NeHe (http://nehe.gamedev.net) ubuntu samples and see how they do it.

12-15-2008, 07:11 AM
No gl.h header ?
try `locate gl.h` to be sure.

Maybe you need to install a dev package too, ie. freeglut comes with all .h needed for gl development, I guess for ubuntu it is called like this : freeglut3-dev