Hi i have a bit of a problem. I want to use opengl in my program. I've added
CONFIG += qt thread warn_off debug_and_release build_all
QT += qt3support opengl
CONFIG += qt thread warn_off debug_and_release build_all
QT += qt3support opengl
To copy to clipboard, switch view to plain text mode
to my .pro file. And i create a simple class derived from QGLWidget
#include <QGLWidget>
{
Q_OBJECT
public:
~MyOpenGL(void);
protected:
};
#include <QGLWidget>
class QPaintEvent;
class MyOpenGL : public QGLWidget
{
Q_OBJECT
public:
MyOpenGL(QWidget *parent = 0, QGLWidget *shareWidget = 0);
~MyOpenGL(void);
protected:
void paintEvent(QPaintEvent *event);
};
To copy to clipboard, switch view to plain text mode
#include "MyOpenGL.h"
#include <QtGui>
#include <QtOpenGL>
{
setFixedSize(200, 200);
setAutoFillBackground(false);
}
MyOpenGL::~MyOpenGL(void)
{
}
{
}
#include "MyOpenGL.h"
#include <QtGui>
#include <QtOpenGL>
MyOpenGL::MyOpenGL(QWidget *parent, QGLWidget *shareWidget)
: QGLWidget(parent, shareWidget)
{
setFixedSize(200, 200);
setAutoFillBackground(false);
}
MyOpenGL::~MyOpenGL(void)
{
}
void MyOpenGL::paintEvent(QPaintEvent *event)
{
}
To copy to clipboard, switch view to plain text mode
Nothing fancy. Now everything works fine in debug mode. However when i switch to release mode, the project compiles and runs to the point where i try to instantiate MyOpenGL class. At that point program crashes with the message from Qt:
"Cannot mix incompatible Qt libraries"
I have only Qt4.3.3 installed on my machine and i develop in msvc2008 on WinXP SP3. I'm quite puzzled by this. Since it runs fine in debug and crashed in release would suggest that there is something fishy with the project setup, but i can't find anything wrong with it. Everything looks ok.
I'll appreciate any thoughts on what could be the cause of this problem.
Bookmarks