1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Qt Toolkit - 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: white; color: black; }
--></style></head><body bgcolor="#ffffff">
<p>
<table width="100%">
<tr><td><a href="index.html">
<img width="100" height="100" src="qtlogo.png"
alt="Home" border="0"><img width="100"
height="100" src="face.png" alt="Home" border="0">
</a><td valign=top><div align=right><img src="dochead.png" width="472" height="27"><br>
<a href="classes.html"><b>Classes</b></a>
-<a href="annotated.html">Annotated</a>
- <a href="hierarchy.html">Tree</a>
-<a href="functions.html">Functions</a>
-<a href="index.html">Home</a>
-<a href="topicals.html"><b>Structure</b></a>
</div>
</table>
<h1 align=center> Installing Qt/X11</h1><br clear="all">
<p>
You may need to be root, depending on the permissions of the directories
where you choose to install Qt.
<p>
<ul>
<li>Unpack the archive if you have not done so already:
<p>
<pre>
cd /usr/local
gunzip qt-x11-<i>version</i>.tar.gz # uncompress the archive
tar xf qt-x11-<i>version</i>.tar # unpack it
</pre>
<p>
This creates the directory /usr/local/qt-<i>version</i> containing the
files from the main archive.
<p>
Rename qt-<i>version</i> to qt (or make a symlink):
<pre>
mv qt-<i>version</i> qt
</pre>
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>
<table>
<tr><td>QTDIR <td> wherever you installed Qt
<tr><td>PATH <td> to locate the moc program and other Qt tools
<tr><td>MANPATH <td> to access the Qt man pages
<tr><td>LD_LIBRARY_PATH <td> for the shared Qt library
<tr><td>QT_FONTPATH <td> optional. A list of directories where Qt can find type1 or true type fonts for
print embedding.
</table>
<p>
This is done like this:
<p>
In .profile (if your shell is bash, ksh, zsh or sh), add the
following lines:
<pre>
QTDIR=/usr/local/qt
PATH=$QTDIR/bin:$PATH
MANPATH=$QTDIR/man:$MANPATH
LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
<p>
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>
If you have some true type or type1 fonts installed in non
standard places, you might want to set the QT_FONTPATH environment
variable to point to these directories. This is not needed, when
all fonts are accessed through local font directories or a local
font server, as Qt will automatically scan the fontpath and the
font servers configuration file. All directories in the fontpath
will need to have a valid fonts.dir file, so Qt can map from X11
font names to the corresponding embeddable font.
</p>
<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> Building.
<p>
This step compiles the Qt library, and builds the example programs,
the tutorial, and the tools (eg. the Designer).
<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 your platform or compiler is not supported, read PORTING. If it is
supported but 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/
</p>
</ul>
<p>
You're done. Qt is now installed.
<p><address><hr><div align="center">
<table width="100%" cellspacing="0" border="0"><tr>
<td>Copyright 2001 Trolltech<td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align="right"><div align="right">Qt version 2.3.2</div>
</table></div></address></body></html>
|