I have GLUT installed, this is the code that I am compiling with GCC:
#include <GL/glut.h>
void display()
{
glClearColor(1.0,1.0,1.0,1.0);
glClear(GL_COLOR_BUFFER_BIT);
glFlush();
}
int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE);
glutInitWindowSize(500,500);
glutCreateWindow("test");
glutDisplayFunc(display);
glutMainLoop();
return 0;
}
This is how I compile it:
gcc -Wall -o test -lGL -lGLU -lglut test.c
And I get no errors/warnings.
But when I execute it the window doesn't appear. In the panel below I see that there is an application alive named "test", but with no window. It freezes the shell for few seconds and then I press ctrl+c and kill it.