From:
[email protected]
Bytheway: Here is a simple program that is usable to test the qt behaviour:
// Standard C/C++
#include <stdio.h>
// Standard Qt
#include <qapplication.h>
#include <qgl.h>
int main (int argc, char* argv[])
{
QApplication a(argc,argv);
if (QGLFormat::hasOpenGL() == false)
{
qWarning ("This system has no OpenGL support. Exiting.");
return -1;
}
printf ("Yout system has OpenGL support.\n");
return 0;
}
There is an interesting point during the linking as well: Normally, because as I mentioned in my previous post the Qt library will dynamically search for
the OpenGL lib, there is no need to link against OpenGL:
g++ -o bug bug.cpp -I/usr/include/qt -lqt-mt
This command succeeds as expected but crashes during runtime:
~/tests/debian_qt_bug> ./bug
Floating point exception
Linking against the OpenGL library explicitly creates an executable showing
the standard buggy behaviour:
g++ -o bug bug.cpp -I/usr/include/qt -lqt-mt -lGL
~/tests/debian_qt_bug> ./bug
This system has no OpenGL support. Exiting.
WR
--
To UNSUBSCRIBE, email to
[email protected]
with a subject of "unsubscribe". Trouble? Contact
[email protected]
--- SoupGate-Win32 v1.05
* Origin: you cannot sedate... all the things you hate (1:229/2)