[QGl ] Opengl wird nicht gelinkt mit gmake
-
Hallo,
ich bin von Madriva auf Aurox Linux umgestiegen.
Unter Mandriva ließ sich das Beispiel von der cd aus dem ofiziellen qt-handbuch zum Thema OpenGl, der Würfel, korrket kompilieren und linken.
Unter Aurox erhalte ich beim Linken folgende Fehlermeldung:
Linken der Datei cube (g++) cube.o(.text+0x174): In function `Cube::initializeGL()': /home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:23: undefined reference to `glShadeModel' cube.o(.text+0x180):/home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:24: undefined reference to `glEnable' cube.o(.text+0x1b8): In function `Cube::resizeGL(int, int)': /home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:30: undefined reference to `glViewport' cube.o(.text+0x1c4):/home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:31: undefined reference to `glMatrixMode' cube.o(.text+0x1c9):/home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:32: undefined reference to `glLoadIdentity' cube.o(.text+0x224):/home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:34: undefined reference to `glFrustum' cube.o(.text+0x24b): In function `Cube::draw()': /home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:61: undefined reference to `glMatrixMode' cube.o(.text+0x250):/home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:62: undefined reference to `glLoadIdentity' cube.o(.text+0x266):/home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:63: undefined reference to `glTranslatef' cube.o(.text+0x288):/home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:64: undefined reference to `glRotatef' cube.o(.text+0x2a5):/home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:65: undefined reference to `glRotatef' cube.o(.text+0x2c2):/home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:66: undefined reference to `glRotatef' cube.o(.text+0x2fb):/home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:69: undefined reference to `glLoadName' cube.o(.text+0x307):/home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:70: undefined reference to `glBegin' cube.o(.text+0x354):/home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:74: undefined reference to `glVertex3f' cube.o(.text+0x364):/home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:76: undefined reference to `glEnd' cube.o(.text+0x3a4): In function `Cube::paintGL()': /home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:40: undefined reference to `glClear' cube.o(.text+0x547): In function `Cube::faceAtPosition(QPoint const&)': /home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:121: undefined reference to `glGetIntegerv' cube.o(.text+0x55d):/home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:122: undefined reference to `glSelectBuffer' cube.o(.text+0x569):/home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:123: undefined reference to `glRenderMode' cube.o(.text+0x56e):/home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:125: undefined reference to `glInitNames' cube.o(.text+0x57a):/home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:126: undefined reference to `glPushName' cube.o(.text+0x586):/home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:128: undefined reference to `glMatrixMode' cube.o(.text+0x58b):/home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:129: undefined reference to `glPushMatrix' cube.o(.text+0x590):/home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:130: undefined reference to `glLoadIdentity' cube.o(.text+0x5bd):/home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:133: undefined reference to `gluPickMatrix' cube.o(.text+0x62d):/home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:135: undefined reference to `glFrustum' cube.o(.text+0x641):/home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:137: undefined reference to `glMatrixMode' cube.o(.text+0x646):/home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:138: undefined reference to `glPopMatrix' cube.o(.text+0x652):/home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:140: undefined reference to `glRenderMode' cube.o(.text+0x18d): In function `Cube::initializeGL()': /home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:25: undefined reference to `glEnable' cube.o(.text+0x236): In function `Cube::resizeGL(int, int)': /home/philipp1/cpp-projects/qt/examples/chap08/cube/cube.cpp:35: undefined reference to `glMatrixMode' collect2: ld gab 1 als Ende-Status zurück gmake: *** [cube] Fehler 1 gmake: Das Target »first« wurde wegen Fehlern nicht aktualisiert.
Dazu ist zusagen: Mesalib ist installiert nach /usr/include/GL/ , die Datei qgl.h liegt unter /usr/lib/qt-3.3/include .
Das unter mandriva kompilierte Beispiel lässt sich problemlos ausführen.
Wäre nett, wenn ihr mir helfen könntet, den Fehler zu lokalisieren.
Danke
-
Wird überhaupt mit GL gelinkt? Ist ein -lgl vorhanden?
-
Wie was?
Keine Ahnung! Wie seh ich das und wo?
EDIT:
mit gcc -IGL -IGLU -Iglut kompiliert:
g++: -lGL: Eingabedateien des Binders unbenutzt, da keine Bindung geschieht
g++: -lGLU: Eingabedateien des Binders unbenutzt, da keine Bindung geschieht
g++: -lglut: Eingabedateien des Binders unbenutzt, da keine Bindung geschiehtEDIT: Jetzt fluppt's!
QMake-Manager: Projekteinstellungen: CONFIG += opengl
das wars!