Hello together,
i had an Problem with Code::Blocks, qt4 and qtOpenGl.
An easy example from http://mih.voxindeserto.de/threadedcube.html (http://mih.voxindeserto.de/threadedcube.html) I downloaded and want to build in Code::Blocks. After some Problems to Found the QT Libaries I have only one error. And I don't know how I can solve it.
I get every time the Error Message:
||=== qt4test, Debug ===|
exampleglwidget.cpp|2|error: QMouseEvent: No such file or directory|
exampleglwidget.cpp||In member function ‘virtual void ExampleGLWidget::mouseMoveEvent(QMouseEvent*)’:|
exampleglwidget.cpp|34|error: ‘class QMouseEvent’ has no member named ‘buttons’|
exampleglwidget.cpp|39|error: ‘class QMouseEvent’ has no member named ‘buttons’|
||=== Build finished: 3 errors, 0 warnings ===|
Why Code:Blocks couldn't find QMouseEvent?
The Inclue
he found, also if I insert the but then the class QMouseEvent has no member named buttons always displayed.
In KDevelop the same code is build without Errors. But I don't like KDevelop, I want to use Code:Blocks.
Can somebody help me?
I found the error! The Function buttons() in QMouseEvent don't exists button() is the right one ;)
But now I have an other Problem:
examplerenderthread.o||In function `ExampleRenderThread::draw()':|
/qt4test/examplerenderthread.cpp|137|undefined reference to `glMatrixMode'|
/qt4test/examplerenderthread.cpp|138|undefined reference to `glLoadIdentity'|
/qt4test/examplerenderthread.cpp|139|undefined reference to `glTranslatef'|
/qt4test/examplerenderthread.cpp|140|undefined reference to `glRotatef'|
/qt4test/examplerenderthread.cpp|141|undefined reference to `glRotatef'|
/qt4test/examplerenderthread.cpp|142|undefined reference to `glRotatef'|
...
...
...
He's don't finde the OpenGL commands, I found in the Internet I must instert "QT += opengl" in the .pov file, I do! And I must set the additional linker options "-lglui -lglut -lGLU -lGL" but where I do that? When I insert it under Project->Build Options->Linker settings->other Linker options it will don't use!
Build Log:
g++ -o qt4test exampleglwidget.o examplerenderthread.o main.o -L/usr/share/qt3/lib -L/usr/X11R6/lib -lqt-mt -lXext -lX11 -lm -lpthread