Installing Qt/X11
Installing Qt X11
To install Qt on X11, you may need to be root, depending on the permissions of the directory where you choose to install Qt.
- Change directory to where you want to install Qt. For example:
cd /usr/local
- Unpack the archive file from the CD:
cp /cdrom/x11/qt-x11-free3.2.1.tar.gz. gunzip qt-x11-free-3.2.1.tar.gz tar xf qt-x11-free-3.2.1.tar
This will create the directory qt-x11-free-3.2.1, assuming that your CD-ROM is mounted at /cdrom.
- Set up certain environment variables for Qt.
The variables are set differently depending on which shell you are using. For example, if your user name is gregory, you can find out which shell you are using with the finger command:
finger gregory
If your shell is bash, ksh, zsh, or sh, add the following lines to the .profile file in your home directory:
QTDIR=/usr/local/qt-x11-free-3.2.1 PATH=$QTDIR/bin:$PATH MANPATH=$QTDIR/doc/man:$MANPATH LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH export QTDIR PATH MANPATH LD_LIBRARY_PATH
If your shell is csh or tcsh, add the following lines to your .login file:
setenv QTDIR /usr/local/qt-x11-free-3.2.1 setenv PATH $QTDIR/bin:$PATH setenv MANPATH $QTDIR/doc/man:$MANPATH setenv LD_LIBRARY_PATH $QTDIR/lib:$LD_LIBRARY_PATH
If you encounter "undefined variable" problems, change the last two lines above to these:
setenv MANPATH $QTDIR/doc/man setenv LD_LIBRARY_PATH $QTDIR/lib
Irrespective of which shell you use, if you install Qt on AIX, replace all occurrences of LD_LIBRARY_PATH with LIBPATH. And if you install Qt on HP-UX, replace LD_LIBRARY_PATH with SHLIB_PATH.
After you have done this, you must either login again or re-source the .profile or .login file before continuing.
- Execute the configure tool with your preferred options to build the Qt library and the tools supplied with it:
cd $QTDIR ./configure
You can run ./configure -help to get a list of configuration options. For example, you can use the -thread option to create a threaded version of the library.
- Type make.
If you want to customize how you install Qt or if you encounter problems with installing Qt, refer to the INSTALL file in $QTDIR for more information.