The Qt package contains a C++ GUI library. This is useful for creating graphical applications or executing graphical applications that are dynamically linked to the Qt library.
Download (FTP): ftp://ftp.trolltech.com/qt/source/qt-x11-free-3.2.1.tar.bz2
Download size: 14 MB
Estimated Disk space required: 155 MB
Estimated build time: 29 SBU (full), 18 SBU (sub-tools)
./configure -prefix /opt/qt-3.2.1 -qt-gif -system-libpng \ -system-libmng -system-zlib -system-libjpeg -no-g++-exceptions \ -thread && make && make install && ln -sfn /opt/qt-3.2.1 /opt/qt && ln -s /opt/qt/lib/libqt-mt.so /opt/qt/lib/libqt.so && cp -r doc/man /opt/qt/doc && cp -r examples /opt/qt/doc |
Note: The build time for Qt is quite long. If you want to save some time and don't want the tutorials and examples, change the first make line above to:
make sub-tools
-prefix /opt/qt-3.2.1: This command sets up the install destination.
-qt-gif: This command adds support for gif files to the libraries.
-system-libpng -system-libmng -system-zlib -system-libjpeg: This command forces the library to use the shared libraries that are on your system instead of recreating its own set of support libraries for these functions.
-no-g++-exceptions: This command disables the exceptions coding generated by the C++ compiler.
-thread: This command compiles the library to support multi-threading.
ln -sfn /opt/qt-3.2.1 /opt/qt: This command standardizes the location of the Qt libraries to the ld.so.conf entry described below.
ln -s /opt/qt/lib/libqt-mt.so /opt/qt/lib/libqt.so: This command allows configure scripts to find a working Qt installation.
cp -r doc/man /opt/qt/doc: This command installs the man directory which is missed by make install.
cp -r examples /opt/qt/doc: This command installs the examples directory which is missed by make install.
As with most libraries, there is no configuration to do, save that the library directory /opt/qt/lib should appear in /etc/ld.so.conf so that ldd can find the shared libraries. The following command will add it if it is missing:
cat >> /etc/ld.so.conf << "EOF" # Begin qt addition to /etc/ld.so.conf /opt/qt/lib # End qt addition EOF ldconfig |
You need to add the path for the Qt man pages to the man.conf file. This can be done with the following command:
cat >> /etc/man.conf << "EOF" # Begin qt addition to man.conf MANPATH /opt/qt/doc/man # End qt addition to man.conf EOF |