OpenGL apps don't run when started from QtCreator >=2.3 but work fine in 2.1/2.2
wEmA last edited by
I am using QtCreator on an openSuSE 11.4(64bit) system to develop an OpenGL application with Qt 4.7.4. Everything works fine with QtCreator 2.1 and 2.2, however, with versions 2.3 and 2.4rc I cannot run the application directly from QtCreator anymore.
On my machine, the problem is reproducible with the OpenGL examples that come with Qt. When I load the "textures" example in QtCreator 2.2, it runs fine. When I run the same example in version 2.3.1 or 2.4rc (2.3.84), I get the following error and the application doesn't display anything:
X Error: BadLength (poly request too large or internal Xlib length error) 16
Extension: 136 (Uknown extension)
Minor opcode: 1 (Unknown request)
Resource id: 0x8a0001b
I've added the following line to GLWidget::initializeGL() in the application:
@std::cout << "OpenGL version supported by this platform (glGetString): " << glGetString(GL_VERSION) << std::endl;@
and get the following output:
QtCreator 2.1 and 2.2:
OpenGL version supported by this platform (glGetString): 4.1.0 NVIDIA 260.19.44
QtCreator 2.3.1 and 2.4rc:
OpenGL version supported by this platform (glGetString): 1.4 (2.1.2 NVIDIA 260.19.44)
Hence, the problem is that the app doesn't get the right OpenGL version. When I run the app from the console, I always get OpenGL 4.1. Has anyone made similar experiences, that is, is this a bug or am I missing something in the new creator version?
tobias.hunger last edited by
Are you using the same Qt version in both Qt Creator 2.1/2.2 and 2.3?
Are there differences in the environment used to run your application? Check Project->build/run settings.
wEmA last edited by
Thanks a lot for your reply, it helped me find the problem! I used the same Qt version and the same run environment settings ("build environment"). However, upon a closer look I noticed that QtCreator 2.3 appends a "/usr/lib64" to the beginning of LD_LIBRARY_PATH for the "build environment" (2.2 doesn't). Switching to "system environment" that goes away and everything runs fine. So maybe there are some conflicting libraries on my system.