Короче говоря, я пытаюсь создать openGL приложение (обычное окно с белым квадратом), но даже после установки openGL - ничего. Как добавить OpenGL и как скомпилировать?
Добавлено.
#include "GL/gl.h"
#include "GL/glut.h"
void display(){
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_POINTS);
glColor3f(0.0, 0.0, 0.0);
glVertex2f(0.25, 0.25);
glEnd();
glFlush();
}
int main(int argc, char** argv){
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize(240, 240);
glutInitWindowPosition(100, 740);
glutCreateWindow("TEST");
glClearColor(1.0, 1.0, 1.0, 1.0);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0);
glutDisplayFunc(display);
glutMainLoop();
}
/tmp/ccQZMEmz.o: In function `main': openGL.cpp:(.text+0x65): undefined reference to `glutInit' openGL.cpp:(.text+0x6f): undefined reference to `glutInitDisplayMode' openGL.cpp:(.text+0x7e): undefined reference to `glutInitWindowSize' openGL.cpp:(.text+0x8d): undefined reference to `glutInitWindowPosition' openGL.cpp:(.text+0x97): undefined reference to `glutCreateWindow' openGL.cpp:(.text+0x102): undefined reference to `glutDisplayFunc' openGL.cpp:(.text+0x107): undefined reference to `glutMainLoop' collect2: ld returned 1 exit status