Доброго времени суток.
собственно проблема такая.
Есть простая программа под OpenGL:
#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);
glutInitWindowSize(240, 240);
glutInitWindowPosition(100, 100);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutCreateWindow("Test");
glClearColor(0, 0, 0, 0);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0);
glutDisplayFunc(display);
glutMainLoop();
return 0;
}
При компиляции компилятор вываливает кучу однотипных ошибок в glu.h
/usr/include/GL/glu.h:326: error: ‘GLint’ has not been declared
/usr/include/GL/glu.h:326: error: ‘GLdouble’ has not been declared
/usr/include/GL/glu.h:326: error: ‘GLdouble’ has not been declared
/usr/include/GL/glu.h:327: error: variable or field ‘gluPerspective’ declared void
/usr/include/GL/glu.h:327: error: ‘GLdouble’ was not declared in this scope
/usr/include/GL/glu.h:327: error: ‘GLdouble’ was not declared in this scope
/usr/include/GL/glu.h:327: error: ‘GLdouble’ was not declared in this scope
/usr/include/GL/glu.h:327: error: ‘GLdouble’ was not declared in this scope
/usr/include/GL/glu.h:328: error: variable or field ‘gluPickMatrix’ declared void
/usr/include/GL/glu.h:328: error: ‘GLdouble’ was not declared in this scope
/usr/include/GL/glu.h:328: error: ‘GLdouble’ was not declared in this scope
/usr/include/GL/glu.h:328: error: ‘GLdouble’ was not declared in this scope
/usr/include/GL/glu.h:328: error: ‘GLdouble’ was not declared in this scope
/usr/include/GL/glu.h:328: error: ‘GLint’ was not declared in this scope
/usr/include/GL/glu.h:328: error: ‘viewport’ was not declared in this scope
/usr/include/GL/glu.h:329: error: ‘GLint’ does not name a type
/usr/include/GL/glu.h:330: error: ‘GLint’ has not been declared
/usr/include/GL/glu.h:330: error: ‘GLfloat’ has not been declared
/usr/include/GL/glu.h:330: error: ‘GLint’ has not been declared
/usr/include/GL/glu.h:330: error: ‘GLenum’ has not been declared
/usr/include/GL/glu.h:331: error: ‘GLenum’ has not been declared
/usr/include/GL/glu.h:332: error: ‘GLenum’ has not been declared
В системе установлено ,по моему, все что только можно: glutg3, libglut3-dev, SDL, mesa
mishaq@mishaq-laptop:~$ glxinfo|grep "OpenGL version"
OpenGL version string: 2.1 Mesa 7.6
Пробовал разные среды - результат один. Гугл на результат ошибки ничего не сказал.
Система ubuntu 10.04 x86_64