<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- /tmp/qt-3.0-reggie-28534/qt-x11-free-3.0.2/doc/installation.doc:50 --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Installing Qt/X11</title> <style type="text/css"><!-- h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; } a:link { color: #004faf; text-decoration: none } a:visited { color: #672967; text-decoration: none } body { background: #ffffff; color: black; } --></style> </head> <body> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr bgcolor="#E5E5E5"> <td valign=center> <a href="index.html"> <font color="#004faf">Home</font></a> | <a href="classes.html"> <font color="#004faf">All Classes</font></a> | <a href="mainclasses.html"> <font color="#004faf">Main Classes</font></a> | <a href="annotated.html"> <font color="#004faf">Annotated</font></a> | <a href="groups.html"> <font color="#004faf">Grouped Classes</font></a> | <a href="functions.html"> <font color="#004faf">Functions</font></a> </td> <td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>Installing Qt/X11</h1> <p> You may need to be root, depending on the permissions of the directories where you choose to install Qt. <p> <ol type=1> <li> Unpack the archive if you have not done so already: <p> <pre> cd /usr/local gunzip qt-x11-version.tar.gz # uncompress the archive tar xf qt-x11-version.tar # unpack it </pre> <p> This creates the directory /usr/local/qt-<em>version</em> containing the files from the main archive. <p> Rename qt-<em>version</em> to qt (or make a symlink): <p> <pre> mv qt-version qt </pre> <p> The rest of this file assumes that Qt is installed in /usr/local/qt. <p> <li> Set some environment variables in the file .profile (or .login, depending on your shell) in your home directory. Create the file if it is not there already. <p> <ul> <li> QTDIR -- wherever you installed Qt <li> PATH -- to locate the <a href="moc.html#moc">moc</a> program and other Qt tools <li> MANPATH -- to access the Qt man pages <li> LD_LIBRARY_PATH -- for the shared Qt library </ul> <p> This is done like this: <p> In .profile (if your shell is bash, ksh, zsh or sh), add the following lines: <p> <pre> QTDIR=/usr/local/qt PATH=$QTDIR/bin:$PATH MANPATH=$QTDIR/man:$MANPATH LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH export QTDIR PATH MANPATH LD_LIBRARY_PATH </pre> <p> In .login (in case your shell is csh or tcsh), add the following lines: <p> <pre> setenv QTDIR /usr/local/qt setenv PATH $QTDIR/bin:$PATH setenv MANPATH $QTDIR/man:$MANPATH setenv LD_LIBRARY_PATH $QTDIR/lib:$LD_LIBRARY_PATH </pre> <p> After you have done this, you will need to login again, or re-source the profile before continuing, so that at least $QTDIR is set. The installation will give an error message and not proceed otherwise. <p> <li> Install your license file. For the free edition, you do not need a license file. For Professional and Enterprise editions, install your license file as described in your distribution. <p> <li> Compile the Qt library, and build the example programs, the tutorial and the tools (eg. the Designer) as follows. <p> Type: <pre> ./configure </pre> <p> This will configure the Qt library for your machine. Note that GIF support is turned off by default. Run ./configure -help to get a list of configuration options. Read PLATFORMS for a list of supported platforms. <p> To create the library and compile all examples and the tutorial: <pre> make </pre> If you have problems, see <a href="http://www.trolltech.com/platforms/">http://www.trolltech.com/platforms/</a>. <p> <li> In very few cases you may need to run /sbin/ldconfig or something similar at this point if you are using shared libraries. <p> If you have problems running the example programs, e.g. messages like <pre> can't load library 'libqt.so.2' </pre> you probably need to put a reference to the qt library in a configuration file and run /sbin/ldconfig as root on your system. And don't forget to set LD_LIBRARY_PATH as explained in 2) above. <p> <li> The online HTML documentation is installed in /usr/local/qt/doc/html/ The main page is /usr/local/qt/doc/html/index.html The man pages are installed in /usr/local/qt/doc/man/ </ol> <p> You're done. Qt is now installed. <p> <!-- eof --> <p><address><hr><div align=center> <table width=100% cellspacing=0 border=0><tr> <td>Copyright © 2001 <a href="http://www.trolltech.com">Trolltech</a><td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a> <td align=right><div align=right>Qt version 3.0.2</div> </table></div></address></body> </html>