I have written a sample code like this in OpenSuse 11.3 (a very new installation) for openGL (installed all the libs that came up in search for openGL from the Software Manager of Yast2).
**File: SimpleOpenGL.c**
#include <GL/glut.h>
int main(int argc,char **argv)
{
glutInit(&argc,argv);
glutInitWindowPosition(100,100);
glutInitWindowSize(800,600);
glutInitDisplayMode(GLUT_DEPTH | GLUT_SINGLE | GLUT_RGBA);
glutCreateWindow("Window");
}
Compiling with : $ gcc -o foo -lGL -lglut SimpleOpenGL.c
Running with : $ ./foo
freeglut (./foo): failed to open display ''
Do I have to install any additional libs in Suse to get this working?