Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Welcome to LinuxQuestions.org, a friendly and active Linux Community.

You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

Im a newbie trying to learn how to build openGL applications under QT (university course)

Im using QT3.3.x (don't know how to search the exact version, sorry) under ubuntu distro and programming a QGLWidget class. All was ok (application running) until i choosed to install the fglrx ATI driver (for my ati mobility radeon 9700) to use 3Dacceleration and i managed to do it.

The problem now is that whenever i try to run any qt application that use QGLWidget i have this error:

I can use glxgears with no problem (and with good fps average) and glxinfo tells me that im really using ati radeon driver instead of mesa3d. Also i tried to change xorg.conf to use the mesa3d driver again but the problem continue.

I'm not at home at this moment so i can't try it now but as soon as i return home i will do what u suggested me and i will post the results!

btw, how can re-compile qt? (maybe the key is to compile with the right opengl option...) At trolltech home i only see qt4 to download (and i think it will be not compatible with qt3 installed at university computers)

it looks like the Qt is compiled well with no direct linkage to any GL libs
that means that GL is loaded using dlopen as in the config option i sugested
unless it's not compiled to use gl at all which seems unlikely because that would mean use of -disable flag in 3.3.3 i think
so no need to recompile (i don't think)
if you need to recompile 3.3.3 there are good instructions in beyond LFS
my copy from 12/22/2004 uses 3.3.3 anyway
if you can't find the book and need to do it i can post the page somewhere.

Qt is designed to use any MESA GLU or GLX lib i think when you use dlopen option but you still have to link you apps to it

the Qt example makefiles use -lGLU then -lGL in that order and will use the first or move on to the second

question:
Do you still have your libGLU.so and libGLU.so.1 in /usr/X11R6/lib
i think this came with X
(Mesa versions earlier than 3.1 would use the name "MesaGL" and "MesaGLU" for the libraries, instead of "GL" and "GLU")
those required Makefile hacking or just make some new sym links called libGLU.so and libGLU.so.1
if i mess up libGLU.so and libGLU.so.1 links in /usr/X11R6/lib
My Qt apps already compiled stop working but new compiles work using /usr/lib/libGL.so.1
appearently it likes the link names .so.1 so make sure they are there not just .so
this one for me is a link to libGL.so.1.0.7676 which is the lib installed by nvidia
(no experience with ati - sorry)
Do you know where and what the libs installed by ATI driver are ?
can you make a link called /usr/lib/libGL.so.1 to it if there is not one ?

My Qt apps already compiled stop working but new compiles work using /usr/lib/libGL.so.1
appearently it likes the link names .so.1 so make sure they are there not just .so

Exactly as u said, Qt likes .so.1 and i didn't have one on /usr/lib. I added it linking to /usr/X11R6/lib/libGL.so.1.2 (i assumed this was the new openGL library by ATI driver) and all applications run again without errors (and without mesa driver as far as i know because now my 3d application is showing smother and redrawing faster whenever i resize its window)

I tried to change -lGL and -lGLU order on Makefile (in the .pro file exactly) but there was no difference for me.
What is LFS?
About the error i had... it was a runtime error (no error compiling and linking)

Quote:

can you compile the opengl examples that come with qt-3.3.3 like box ? and will they run after you compile them?

WooHoo something actually got resolved.
LFS = Linux from scratch
if the examples didn't come with the distribution package download the 3.3.3 source code and they are in
qt-x11-free-3.3.3/examples/
lots and lots of examples with 7 in
qt-x11-free-3.3.3/examples/opengl
you gotta love those trolls