Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > by-pkgid > 2490fc2409e43f71a6d82544660cf84c > files > 473

doxygen-1.4.4-1.1.20060mdk.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Doxygen manual: Installation</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.4 -->
<h1><a class="anchor" name="install">Installation</a></h1> First go to the <a href="http://www.doxygen.org/download.html">download</a> page  to get the latest distribution, if you did not have it already.<p>
This section is divided into the following sections: <ul>
<li>
<a class="el" href="install.html#install_src_unix">Compiling from source on Unix</a> </li>
<li>
<a class="el" href="install.html#install_bin_unix">Installing the binaries on Unix</a> </li>
<li>
<a class="el" href="install.html#unix_problems">Known compilation problems for Unix</a> </li>
<li>
<a class="el" href="install.html#install_src_windows">Compiling from source on Windows</a> </li>
<li>
<a class="el" href="install.html#install_bin_windows">Installing the binaries on Windows</a> </li>
<li>
<a class="el" href="install.html#build_tools">Tools used to develop doxygen</a> </li>
</ul>
<h2><a class="anchor" name="install_src_unix">
Compiling from source on Unix</a></h2>
If you downloaded the source distribution, you need at least the following to build the executable: <ul>
<li>
The <a href="ftp://prep.ai.mit.edu/pub/gnu/">GNU</a> tools flex, bison and make    </li>
<li>
In order to generate a Makefile for your platform, you need <a href="http://www.perl.com/">perl</a> .  </li>
</ul>
<p>
To take full advantage of doxygen's features the following additional tools should be installed.<p>
<ul>
<li>
Troll Tech's GUI toolkit <a href="http://www.trolltech.com/products/qt.html">Qt</a>   version 3.2 or higher. This is needed to build the GUI front-end doxywizard. </li>
<li>
A <img class="formulaInl" alt="$\mbox{\LaTeX}$" src="form_0.png"> distribution: for instance <a href="http://www.tug.org/interest.html#free">teTeX 1.0</a> . This is needed for generating LaTeX, Postscript, and PDF output. </li>
<li>
<a href="http://www.research.att.com/sw/tools/graphviz/">the Graph visualization toolkit version 1.8.10 or higher</a> . Needed for the include dependency graphs, the graphical inheritance graphs, and the collaboration graphs. If you compile graphviz yourself, make sure you do include freetype support (which requires the freetype library and header files), otherwise the graphs will not render proper text labels. </li>
<li>
The ghostscript interpreter. To be found at <a href="http://www.ghostscript.com/">www.ghostscript.com</a>. </li>
</ul>
<p>
Compilation is now done by performing the following steps:<p>
<ol>
<li>
Unpack the archive, unless you already have done that:<p>
<div class="fragment"><pre class="fragment">    gunzip doxygen-$VERSION.src.tar.gz    # uncompress the archive
    tar xf doxygen-$VERSION.src.tar       # unpack it
</pre></div><p>
</li>
<li>
Run the configure script:<p>
<div class="fragment"><pre class="fragment">    sh ./configure
</pre></div><p>
The script tries to determine the platform you use, the make tool (which <em>must</em> be GNU make) and the perl interpreter. It will report what it finds.<p>
To override the auto detected platform and compiler you can run configure as follows:<p>
<div class="fragment"><pre class="fragment">    configure --platform platform-type
</pre></div><p>
See the <code>PLATFORMS</code> file for a list of possible platform options.<p>
If you have Qt-3.2.x or higher installed and want to build the GUI front-end, you should run the configure script with the <code>--with-doxywizard</code> option:<p>
<div class="fragment"><pre class="fragment">    configure --with-doxywizard
</pre></div><p>
For an overview of other configuration options use<p>
<div class="fragment"><pre class="fragment">    configure --help
</pre></div><p>
</li>
<li>
Compile the program by running make:<p>
<div class="fragment"><pre class="fragment">    make
</pre></div><p>
The program should compile without problems and three binaries (<code>doxygen</code> and <code>doxytag</code>) should be available in the bin directory of the distribution.<p>
</li>
<li>
Optional: Generate the user manual.<p>
<div class="fragment"><pre class="fragment">    make docs
</pre></div><p>
To let doxygen generate the HTML documentation.<p>
<dl compact><dt><b>Note:</b></dt><dd>You will need the stream editor <code>sed</code> for this, but this should be available on any Unix platform.</dd></dl>
The HTML directory of the distribution will now contain the html documentation (just point a HTML browser to the file <code>index.html</code> in the html directory).<p>
</li>
<li>
Optional: Generate a PDF version of the manual (you will need <code>pdflatex</code>, <code>makeindex</code>, and <code>egrep</code> for this).<p>
<div class="fragment"><pre class="fragment">    make pdf
</pre></div><p>
The PDF manual <code>doxygen_manual.pdf</code> will be located in the latex directory of the distribution. Just view and print it via the acrobat reader.<p>
</li>
</ol>
<h2><a class="anchor" name="install_bin_unix">
Installing the binaries on Unix</a></h2>
After the compilation of the source code do a <code>make install</code> to install doxygen. If you downloaded the binary distribution for Unix, type:<p>
<div class="fragment"><pre class="fragment">    ./configure
    make install
</pre></div><p>
Binaries are installed into the directory <code>&lt;prefix&gt;/bin</code>. Use <code>make install_docs</code> to install the documentation and examples into <code>&lt;docdir&gt;/doxygen</code>.<p>
<code>&lt;prefix&gt;</code> defaults to <code>/usr</code> but can be changed with the <code>--prefix</code> option of the configure script. The default <code>&lt;docdir&gt;</code> directory is <code>&lt;prefix&gt;/share/doc/packages</code> and can be changed with the <code>--docdir</code> option of the configure script.<p>
Alternatively, you can also copy the binaries from the <code>bin</code> directory manually to some <code>bin</code> directory in your search path. This is sufficient to use doxygen.<p>
<dl compact><dt><b>Note:</b></dt><dd>You need the GNU install tool for this to work (it is part of the fileutils package). Other install tools may put the binaries in the wrong directory!</dd></dl>
If you have a RPM or DEP package, then please follow the standard installation procedure that is required for these packages.<h2><a class="anchor" name="unix_problems">
Known compilation problems for Unix</a></h2>
<b>Qt problems</b><p>
The Qt include files and libraries are not a subdirectory of the directory pointed to by QTDIR on some systems (for instance on Red Hat 6.0 includes are in /usr/include/qt and libs are in /usr/lib).<p>
The solution: go to the root of the doxygen distribution and do: <div class="fragment"><pre class="fragment">   mkdir qt
   cd qt
   ln -s your-qt-include-dir-here include
   ln -s your-qt-lib-dir-here lib
   export QTDIR=$PWD
</pre></div><p>
If you have a csh-like shell you should use <code>setenv QTDIR $PWD</code> instead of the <code>export</code> command above.<p>
Now install doxygen as described above.<p>
<b>Bison problems</b><p>
Versions 1.31 to 1.34 of bison contain a "bug" that results in a compiler errors like this:<p>
ce_parse.cpp:348: member `class CPPValue yyalloc::yyvs' with constructor not allowed in union<p>
This problem has been solved in version 1.35 (versions before 1.31 will also work).<p>
<b>Latex problems</b><p>
The file <code>a4wide.sty</code> is not available for all distributions. If your distribution does not have it please select another paper type in the config file (see the <a class="el" href="config.html#cfg_paper_type">PAPER_TYPE</a> tag in the config file).<p>
<b>HP-UX &amp; Digital Unix problems</b><p>
If you are compiling for HP-UX with aCC and you get this error: <div class="fragment"><pre class="fragment">    /opt/aCC/lbin/ld: Unsatisfied symbols:
    alloca (code)
</pre></div> then you should (according to Anke Selig) edit <code>ce_parse.cpp</code> and replace <div class="fragment"><pre class="fragment">    extern "C" {
      void *alloca (unsigned int);
    };
</pre></div> with <div class="fragment"><pre class="fragment">    #include &lt;alloca.h&gt;  
</pre></div><p>
If that does not help, try removing <code>ce_parse.cpp</code> and let bison rebuild it (this worked for me).<p>
If you are compiling for Digital Unix, the same problem can be solved (according to Barnard Schmallhof) by replacing the following in ce_parse.cpp:<p>
<div class="fragment"><pre class="fragment">    #else  not GNU C.  
    #if (!defined (__STDC__) &amp;&amp; defined (sparc)) || defined (__sparc__) \
        || defined (__sparc) || defined (__sgi)
    #include &lt;alloca.h&gt;
</pre></div><p>
with<p>
<div class="fragment"><pre class="fragment">    #else  not GNU C.  
    #if (!defined (__STDC__) &amp;&amp; defined (sparc)) || defined (__sparc__) \
        || defined (__sparc) || defined (__sgi) || defined (__osf__)
    #include &lt;alloca.h&gt;
</pre></div><p>
Alternatively, one could fix the problem at the bison side. Here is patch for bison.simple (provided by Andre Johansen):<p>
<div class="fragment"><pre class="fragment">--- bison.simple~       Tue Nov 18 11:45:53 1997
+++ bison.simple        Mon Jan 26 15:10:26 1998
@@ -27,7 +27,7 @@
 #ifdef __GNUC__
 #define alloca __builtin_alloca
 #else  not GNU C.  
-#if (!defined (__STDC__) &amp;&amp; defined (sparc)) || defined (__sparc__) \
     || defined (__sparc) || defined (__sgi)
+#if (!defined (__STDC__) &amp;&amp; defined (sparc)) || defined (__sparc__) \
     || defined (__sparc) || defined (__sgi) || defined (__alpha)
 #include &lt;alloca.h&gt;
 #else  not sparc 
 #if defined (MSDOS) &amp;&amp; !defined (__TURBOC__)
</pre></div><p>
The generated scanner.cpp that comes with doxygen is build with this patch applied.<p>
<b>Sun compiler problems</b><p>
It appears that doxygen doesn't work properly if it is compiled with Sun's C++ WorkShop Compiler. I cannot verify this myself as I do not have access to a Solaris machine with this compiler. With GNU compiler it does work.<p>
when configuring with <code>--static</code> I got:<p>
<div class="fragment"><pre class="fragment">Undefined                       first referenced
 symbol                             in file
dlclose                             /usr/lib/libc.a(nss_deffinder.o)
dlsym                               /usr/lib/libc.a(nss_deffinder.o)
dlopen                              /usr/lib/libc.a(nss_deffinder.o)
</pre></div><p>
Manually adding <code>-Bdynamic</code> after the target rule in <code>Makefile.doxygen</code> and <code>Makefile.doxytag</code> will fix this:<p>
<div class="fragment"><pre class="fragment">$(TARGET): $(OBJECTS) $(OBJMOC) 
        $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) -Bdynamic
</pre></div><p>
<b>GCC compiler problems</b><p>
Older versions of the GNU compiler have problems with constant strings containing characters with character codes larger than 127. Therefore the compiler will fail to compile some of the translator_xx.h files. A workaround, if you are planning to use the English translation only, is to configure doxygen with the <code>--english-only</code> option.<p>
On some platforms (such as OpenBSD) using some versions of gcc with -O2 can lead to eating all memory during the compilation of files such as config.cpp. As a workaround use --debug as a configure option or omit the -O2 for the particular files in the Makefile.<p>
Gcc versions before 2.95 may produce broken binaries due to bugs in these compilers.<p>
<b>Dot problems</b><p>
Due to a change in the way image maps are generated, older versions of doxygen (&lt;=1.2.17) will not work correctly with newer versions of graphviz (&gt;=1.8.8). The effect of this incompatibility is that generated graphs in HTML are not properly clickable. For doxygen 1.3 it is recommended to use at least graphviz 1.8.10 or higher.<p>
<b>Red Hat 9.0 problems</b><p>
If you get the following error after running make <div class="fragment"><pre class="fragment">tmake error: qtools.pro:70: Syntax error
</pre></div> then first type <div class="fragment"><pre class="fragment">export LANG=
</pre></div> before running make.<h2><a class="anchor" name="install_src_windows">
Compiling from source on Windows</a></h2>
Currently, I have only compiled doxygen for Windows using Microsoft's Visual C++ (version 6.0). For other compilers you may need to edit the perl script in <code>wintools/make.pl</code> a bit. Let me know what you had to change if you got Doxygen working with another compiler. If you have Visual Studio you can also use the .dsw file found in the <code>wintools</code> directory. Note that this file is not maintained by me, so it might be outdated a little.<p>
If you have Visual C++ 6.0, and the source distribution, you can easily build doxygen using the project files in the <code>wintools</code> directory. If you want to build the CVS sources, or want to build from the command line, or with another compiler, you have to follow the steps below.<p>
Thomas Baust reported that if you have Visual Studio.NET (2003) then you should be aware that there is a problem with the _popen() and _pclose() implementation, which currently leaks handles, so if you build doxygen with it and use the INPUT_FILTER, you will run to risk of crashing Windows! The problem is reported to and confirmed by Microsoft so maybe it will fixed in the next service pack.<p>
Since Windows comes without all the nice tools that Unix users are used to, you'll need to install a number of these tools before you can compile doxygen for Windows from the command-line.<p>
Here is what is required: <ul>
<li>
An unzip/untar tool like WinZip to unpack the tar source distribution. This can be found at <a href="http://www.winzip.com/">http://www.winzip.com/</a><p>
The good, tested, and free alternative is the <code>tar</code> utility supplied with <a href="http://sourceware.cygnus.com/cygwin/">cygwin tools</a>. Anyway, the cygwin's flex, bison, and sed are also recommended below.<p>
</li>
<li>
Microsoft Visual C++ (I only tested with version 6.0). Use the <code>vcvars32.bat</code> batch file to set the environment variables (if you did not select to do this automatically during installation).<p>
Borland C++ or MINGW (see <a href="http://www.mingw.org/">http://www.mingw.org/</a>) are also supported.<p>
</li>
<li>
Perl 5.0 or higher for Windows. This can be downloaded from: <a href="http://www.ActiveState.com/Products/ActivePerl/">http://www.ActiveState.com/Products/ActivePerl/</a><p>
</li>
<li>
The GNU tools flex, bison, and sed. To get these working on Windows you should install the <a href="http://sources.redhat.com/cygwin/">cygwin tools</a> <p>
Alternatively, you can also choose to download only a <a href="http://www.doxygen.org/dl/cygwin_tools.zip">small subset</a>  of the cygwin tools that I put together just to compile doxygen.<p>
As a third alternative one could use the GNUWin32 tools that can be found at <a href="http://gnuwin32.sourceforge.net/">http://gnuwin32.sourceforge.net/</a><p>
Make sure the <code>BISON_SIMPLE</code> environment variable points to the location where the files <code>bison.simple</code> and is located. For instance if these file is in <code>c:\tools\cygwin\usr\share</code> then BISON_SIMPLE should be set to <code>c:/tools/cygwin/usr/share/bison.simple</code><p>
Also make sure the tools are available from a dos box, by adding the directory they are in to the search path.<p>
For those of you who are very new to cygwin (if you are going to install it from scratch), you should notice that there is an archive file <code>bootstrap.zip</code> which also contains the <code>tar</code> utility (<code>tar.exe</code>), <code>gzip</code> utilities, and the <code>cygwin1.dll</code> core. This also means that you have the <code>tar</code> in hands from the start. It can be used to unpack the tar source distribution instead of using WinZip -- as mentioned at the beginning of this list of steps.<p>
</li>
<li>
From Doxygen-1.2.2-20001015 onwards, the distribution includes the part of Qt-2.x.y that is needed for to compile doxygen and doxytag, The Windows specific part were also created. As a result doxygen can be compiled on systems without X11 or the commerical version of Qt.<p>
For doxywizard, a complete Qt library is still a requirement however. A commercial license to build doxywizard with the latest Qt library was kindly donated to me by the nice people at <a href="http://www.trolltech.com">TrollTech</a>. See doxygen download page for a link.<p>
</li>
<li>
If you used WinZip to extract the tar archive it will (apparently) not create empty folders, so you have to add the folders <code>objects</code> and <code>bin</code> manually in the root of the distribution before compiling.<p>
</li>
</ul>
<p>
Compilation is now done by performing the following steps:<p>
<ol>
<li>
Open a dos box. Make sure all tools (i.e. <code>nmake</code>, <code>latex</code>, <code>gswin32</code>, <code>dvips</code>, <code>sed</code>, <code>flex</code>, <code>bison</code>, <code>cl</code>, <code>rm</code>, and <code>perl</code>), are accessible from the command-line (add them to the PATH environment variable if needed).<p>
Notice: The use of LaTeX is optional and only needed for compilation of the documentation into PostScript or PDF. It is <em>not</em> needed for compiling the doxygen's binaries.<p>
</li>
<li>
Go to the doxygen root dir and type:<p>
<div class="fragment"><pre class="fragment">    make.bat msvc
</pre></div><p>
This should build the executables <code>doxygen.exe</code> and <code>doxytag.exe</code> using Microsoft's Visual C++ compiler (The compiler should not produce any serious warnings or errors).<p>
You can use also the <code>bcc</code> argument to build executables using the Borland C++ compiler, or <code>mingw</code> argument to compile using GNU gcc.<p>
</li>
<li>
To build the examples, go to the <code>examples</code> subdirectory and type:<p>
<div class="fragment"><pre class="fragment">    nmake
</pre></div><p>
</li>
<li>
To generate the doxygen documentation, go to the <code>doc</code> subdirectory and type:<p>
<div class="fragment"><pre class="fragment">    nmake
</pre></div><p>
The generated HTML docs are located in the <code>..\html</code> subdirectory.<p>
The sources for LaTeX documentation are located in the <code>..\latex</code> subdirectory. From those sources, the DVI, PostScript, and PDF documentation can be generated. </li>
</ol>
<h2><a class="anchor" name="install_bin_windows">
Installing the binaries on Windows</a></h2>
There is no fancy installation procedure at the moment (if anyone can add it in a location independent way please let me know).<p>
To install doxygen, just copy the binaries from the <code>bin</code> directory to a location somewhere in the path. Alternatively, you can include the <code>bin</code> directory of the distribution to the path.<p>
There are a couple of tools you may want to install to use all of doxygen's features:<p>
<ul>
<li>
To generate LaTeX documentation or formulas in HTML you need the tools: <code>latex</code>, <code>dvips</code> and <code>gswin32</code>. To get these working under Windows install the fpTeX distribution. You can find more info at: <a href="http://www.fptex.org/">http://www.fptex.org/</a> and download it from CTAN or one of its mirrors. In the Netherlands for example this would be: <a href="ftp://ftp.easynet.nl/mirror/CTAN/systems/win32/fptex/">ftp://ftp.easynet.nl/mirror/CTAN/systems/win32/fptex/</a><p>
Make sure the tools are available from a dos box, by adding the directory they are in to the search path.<p>
For your information, the LaTeX is freely available set of so called macros and styles on the top of the famous TeX program (by famous Donald Knuth) and the accompanied utilities (all available for free). It is used for high quality typesetting. The result -- in the form of so called <code>DVI</code> (DeVice Independent) file -- can be printed or displayed on various devices preserving exactly the same look up to the capability of the device. The <code>dvips</code> allows you to convert the <code>dvi</code> to the high quality PostScript (i.e. PostScript that can be processed by utilities like <code>psnup</code>, <code>psbook</code>, <code>psselect</code>, and others). The derived version of TeX (the pdfTeX) can be used to produce PDF output instead of DVI, or the PDF can be produced from PostScript using the utility <code>ps2pdf</code>.<p>
If you want to use MikTeX then you need to select at least the medium size installation. For really old versions of MikTex or minimal installations, you may need to download the fancyhdr package separately. You can find it at: <a href="ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/fancyhdr/">ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/supported/fancyhdr/</a><p>
</li>
<li>
If you want to generate compressed HTML help (see <a class="el" href="config.html#cfg_generate_htmlhelp">GENERATE_HTMLHELP</a>) in the config file, then you need the Microsoft HTML help workshop. You can download it at: <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html/vsconHH1Start.asp">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html/vsconHH1Start.asp</a><p>
</li>
<li>
<a href="http://www.research.att.com/sw/tools/graphviz/">the Graph visualization toolkit version 1.8.10</a><br>
 . Needed for the include dependency graphs, the graphical inheritance graphs, and the collaboration graphs. </li>
</ul>
<h2><a class="anchor" name="build_tools">
Tools used to develop doxygen</a></h2>
Doxygen was developed and tested under Linux using the following open-source tools: <ul>
<li>
GCC version 3.3.1 </li>
<li>
GNU flex version 2.5.4 </li>
<li>
GNU bison version 1.75 </li>
<li>
GNU make version 3.80 </li>
<li>
Perl version 5.8.1 </li>
<li>
VIM version 6.2 </li>
<li>
Mozilla 1.0 </li>
<li>
Troll Tech's tmake version 1.3 (included in the distribution) </li>
<li>
teTeX version 1.0 </li>
<li>
CVS 1.10.7 </li>
</ul>
<p>
 
Go to the <a href="starting.html">next</a> section or return to the
 <a href="index.html">index</a>.
 <hr size="1"><address style="align: right;"><small>Generated on Wed Nov 15 11:05:48 2006 for Doxygen manual by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
</html>