PDA

View Full Version : compiling issue - Ubuntu -> Eclipse



miroslav_karpis
12-14-2008, 11: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?

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

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

_NK47
12-15-2008, 03: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.

ZbuffeR
12-15-2008, 08: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