OpenGL and Qt

Hi, I got problems compiling openGL-code within a qt-Framework. I tried the openGL-example from the Oreilly-book “Programming with qt”. The example uses the qgl.h headerfile and defines a “Sierpinsky-triangle”-class which inherits from QGLWidget. I used tmake with “openGL”-option to generate a makefile. By calling the compiler, I get at least one error-message for each method in the “Sierpinski-class” which says: (.gnu.linkonce.d.__vt16SierpinskiWidget+0):
undefined reference to `QGLWidget::“methodname”()’.
Does this look familiar to somebody?
I’m using SuSE 7.0 and just installed the standard mesa-library(Compiling redbook-glut-examples is no problem). Anything, i forgot?

sounds like a qt problem to me. are you linking to the qt libraries? can you compile other non-GL qt stuff the same way? did you include the Q_OBJECT macro in your class definition?

i think you will have better luck on a qt related forum though…

QT programms need to be linked (as say in your book -i’ve got the same) to QT libraries.
And you must add qgl links, and opengl links.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.