Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2003-04

once again opengl/glut error msg. (linux)

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Karim Forsthofer

Hello

I wrote a new simple GLUT code , It call triangle.pp The code compiles fine, but when I whant to run it, I get this msg on the console :

/triangles: relocation error: /usr/lib/libglut.so.3: undefined symbol: glXQueryExtension

It seems that the glutlib use a glx function that is not supported or not reachable. By the way, I installled the new package from the freepascal website, with the GLU units etc.

Is the code o.k ?(would be nice, if somebody could run it on a linux machine)

Here is it :

program triangle;
uses
  gl, glu, glut;
procedure init;
begin
    glClearColor(0.0, 0.0, 0.0, 0.0);
    glColor3f(0.0, 0.0, 0.0);
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity;
    gluPerspective(45.0, 23.0, 0.1, 100.0);
end;
procedure display;
begin
    glClear(GL_COLOR_BUFFER_BIT);
    glBegin(GL_TRIANGLES);
          glVertex3f( 0.0, 1.0,-10.0);
          glVertex3f(-1.0,-1.0,-10.0);
          glVertex3f( 1.0,-1.0,-10.0);
          glEnd;
    glutSwapBuffers;
 end;
 begin
    glutInitWindowSize(250,250);
    glutInitWindowPosition(100,200);
    glutCreateWindow('triangles');
    init;
    glutDisplayFunc(@ display);
    glutMainLoop;
 end.
______________________________________________ http://www.linuxmail.org/ Now with e-mail forwarding for only US$5.95/yr Powered by Outblaze

Reply by email

Sebastian Günther
to Karim Forsthofer
Karim Forsthofer wrote 9 lines
Hello I wrote a new simple GLUT code , It call triangle.pp The code compiles fine, but when I whant to run it, I get this msg on the console : /triangles: relocation error: /usr/lib/libglut.so.3: undefined symbol: glXQueryExtension It seems that the glutlib use a glx function that is not supported or not reachable. By the way, I installled the new package from the freepascal website, with the GLU units etc.

I don't get this error message

Is the code o.k ?(would be nice, if somebody could run it on a linux machine)

No, there is a bug: You must declare your callbacks as cdecl, i.e.

procedure display; cdecl;

- Sebastian

Reply by email