1.3 Downloading qt-3.0.5
Download qt-3.0.5 at ftp.trolltech.com and extract it to it's own
directory (and rename the directory).
Code:
[]# cd /usr/lib/
[]# wget --passive ftp
ftp://ftp.trolltech.com/qt/source/qt...e-3.0.5.tar.gz
[]# tar zxvf qt-x11-free-3.0.5.tar.gz
[]# mv qt-x11-free-3.0.5 qt-3.0.5
1.4 Editting linux-g++-shared
edit the file "mkspecs/linux-g++/qmake.conf and change all
references to "gcc" to "gcc3" as well as "g++" to "g++3"
(lines 12, 27, 47, and 48). save your changes (ctrl-o, ctrl-x)
Code:
[]# pico -w /usr/lib/qt-3.0.5/mkspecs/linux-g++/qmake.conf
1.5 NOTE TO USERS WITH A HIGHER VERSION OF gcc
This document assumes you have gcc3 and g++3 executable on your system
(as included in Red Hat 7.2). Depending on the distro (in other words:
anything other then Red Hat 7.2), which RPMs you used and the phase of
the moon, you may only have gcc<specified-version-number> or
g++<specified-version-number> executables.
Change everywhere in this document where it says gcc3 to gcc<version>
and g++3 to g++<version>
To see the version numbers for your installed compiler, please follow
the next steps:
- Open a console and type "gcc" then press the <TAB> key once or twice.
This will attempt to "auto complete" what you are typing. Pressing it
twice should list all the options you have.
Result:
[]# gcc
gcc gcc-3.1
[]#
Do NOT use plain gcc, you need at least gcc3 or a higher version. In this
example you'd use "gcc-3.1" and "g++-3.1" instead of the mentioned "gcc3"
and "g++3"
If you do not see any other versions of gcc then plain "gcc"on your
system, then you did not install all specified packages as mentioned
in step 1.2
1.6 Compiling QT
"export QTDIR" and the "MOC" environmental and configure and compile
qt-3.0.5 with the -thread option. Optionally you can use "gmake -j2"
to possibly speed up compile. If you have 2 cpus then you can even
use use "gmake -j3"
** this compile will take a LONG time, possibly as few as 1 hour and as
many as 6 depending on cpu speed. **
Code:
[]# cd /usr/lib/qt-3.0.5
[]# export QTDIR=/usr/lib/qt-3.0.5
[]# export PATH=$QTDIR/bin:$PATH
[]# export MANPATH=$QTDIR/man:$MANPATH
[]# export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
[]# ./configure -thread
[]# gmake
[]# gmake install
You might find that adding the line "/usr/lib/qt-3.0.5/lib" to the file
"/etc/ld.so.conf" then running "ldconfig" will help you.
Code:
[]# echo "/usr/lib/qt-3.0.5/lib" >> /etc/ld.so.conf
[]# ldconfig