PDA

View Full Version : How to install Qt 3.3.5 on Redhat 9?(especially for the env varible setting process)


luffy27
16th May 2007, 19:26
I'm using the very old os(RedHat9), because for some reason I cannot use other newer operaton system.
Here is my problem.
The default version of Qt on RedHat9 is 3.1. But I want to install the Qwt http://qwt.sourceforge.net/which is a library based of Qt to do my job. And the Qwt 5.0.x needs Qt>=3.3, so I want to install a Qt 3.3.5 on my machine.
I downloaded the "qt-x11-free-3.3.5.tar".

I know that I needn't firstly uninstall the default Qt3.1. The only thing that I should do is install the new Qt 3.3.5 followed by the install instruction within the source package.

But I'm not very clear about the environment varible settings. How to set these env varible correctly to make sure that I can use the newly installed Qt 3.3.5 instead of the default Qt3.1?
Could anybody write something about the env varible settings process.

Thanks a lot.

wysota
17th May 2007, 10:54
Set $QTDIR to your new installation directory and make sure qmake from 3.3.5 comes before the one from 3.1 in your $PATH.

luffy27
17th May 2007, 13:42
Set $QTDIR to your new installation directory and make sure qmake from 3.3.5 comes before the one from 3.1 in your $PATH.

How can I make sure that qmake form 3.3.5 comes before the one from 3.1 in my $PATH?
Can you offer me some examples? What the name of the file should I change this within?

My new Qt 3.3.5 is installed at /usr/local/qt.

And I have another question. Please help me.
I have installed the Qt 3.3.5 successfully. And when I try to install the Qwt 5.0.1, the compiling works fine. But at the end of the installation, the terminal shows me a error "ld: cannot find -lqt-mt". I have already set the QTDIR, LD_LIBRARY_PATH, PATH point to the new Qt3.3.5 directory. I set this env variable in my /etc/profile.

Do you think that the "ld: cannot find -lqt-mt" error was generated by the qmake setting in $PATH as you mentioned before?
Or is there something that I also should change but not change,like /etc/ld.so.conf ?

THanks a lot.

wysota
17th May 2007, 13:46
How can I make sure that qmake form 3.3.5 comes before the one from 3.1 in my $PATH?
Can you offer me some examples? What the name of the file should I change this within?

http://www.linuxheadquarters.com/howto/basic/path.shtml


I have installed the Qt 3.3.5 successfully. And when I try to install the Qwt 5.0.1, the compiling works fine. But at the end of the installation, the terminal shows me a error "ld: cannot find -lqt-mt". I have already set the QTDIR, LD_LIBRARY_PATH, PATH point to the new Qt3.3.5 directory. I set this env variable in my /etc/profile.
LD_LIBRARY_PATH should point to the lib subdirectory.

luffy27
17th May 2007, 16:24
Thank you wysota.
I solve the problem. As you mentioned in another thread in the forum, I recompiled the Qt3.3.5 with thread support by ./configure -thread.
Then the Qwt can find the needed library.

Thanks again, best regards.