Doxygen: Installation

Doxygen

Installation

First go to the download page to get the latest distribution, if you have not downloaded doxygen already.

# Compiling from source on UNIX

If you downloaded the source distribution, you need at least the following to build the executable:

- The GNU tools `flex`, `bison`, `libiconv` and `GNU make`, and `strip`
- In order to generate a `Makefile` for your platform, you need cmake version 2.8.12 or later.

To take full advantage of doxygen's features the following additional tools should be installed.

- Qt Software's GUI toolkit Qt version 4.3 or higher (but currently, Qt 5.x is not yet supported). This is needed to build the GUI front-end doxywizard.
- A distribution: for instance TeX Live This is needed for generating , Postscript, and PDF output.
- the Graph visualization toolkit version 1.8.10 or higher 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.
- For formulas in the HTML output (when MathJax is not used) or in case you do not wish to use `pdflatex, the ghostscript interpreter is needed. You can find it at www.ghostscript.com.

Compilation is now done by performing the following steps:

1. Unpack the archive, unless you already have done that:

       gunzip doxygen-$VERSION.src.tar.gz    # uncompress the archive
       tar xf doxygen-$VERSION.src.tar       # unpack it

2. Create a build directory (for instance inside the source tree)

       cd doxygen-$VERSION
       mkdir build

3. Run cmake with the makefile generator

       cmake -G "Unix Makefiles" ..

   `cmake` tries to determine the platform you use, and will look for the requires tools. It will report if something is missing.

   If you have Qt-4.3 or higher installed and want to build the GUI front-end, you should enable it as follows:

       cmake -Dbuild_wizard=YES

   For an overview of other configuration options use

       cmake -L

4. Compile the program by running make:

       make

   The program should compile without problems and the binaries (`doxygen` and optionally `doxywizard`) should be available in the bin directory within the build directory.

5. Optional: Generate the user manual.

       cmake -Dbuild_doc=YES
       make docs

   To let doxygen generate the HTML and PDF documentation.

   The HTML directory within the build directory will now contain the html documentation (just point a HTML browser to the file `index.html` in the html directory).

# Installing the binaries on UNIX

After the compilation of the source code do a `make install` to install doxygen. If you downloaded the binary distribution for UNIX, type:

    ./configure
    make install

Binaries are installed into the directory `<prefix>/bin`. Use `make install_docs` to install the documentation and examples into `<docdir>/doxygen`.

`<prefix>` defaults to `/usr/local` but can be changed with the `--prefix` option of the configure script. The default `<docdir>` directory is `<prefix>/share/doc/packages` and can be changed with the `--docdir` option of the configure script.

Alternatively, you can also copy the binaries from the `bin` directory manually to some `bin` directory in your search path. This is sufficient to use doxygen.

Note
  You need the GNU install tool for this to work (it is part of the coreutils package). Other install tools may put the binaries in the wrong directory!

If you have a RPM or DEP package, then please follow the standard installation procedure that is required for these packages.

# Compiling from source on Windows

From version 1.8.10 onwards, build files need to be generated by cmake. cmake can be downloaded from http://www.cmake.org/download/

At the moment only the express version of Visual Studio 2013 is tested, but other version might also work.

Alternatively, you can compile doxygen the UNIX way using Cygwin or MinGW.

The next step is to install modern versions of `bison` and `flex` (see http://sourceforge.net/projects/winflexbison. After installation and adding them to your `path` rename `win_flex.exe` to `flex.exe` and `win_bison.exe` to `bison.exe`) Furthermore you have to install `python` (version 2.6 or higher, see http://www.python.org). These packages are needed during the compilation process.

Download doxygen's source tarball and put it somewhere (e.g. use `c:\tools`)

Now start a visual studio native command shell (for either x86 or x64) and type

    cd c:\tools
    tar zxvf doxygen-x.y.z.src.tar.gz

to unpack the sources (you can obtain `tar` from e.g. http://gnuwin32.sourceforge.net/packages.html). Alternatively you can use an unpack program, like 7-Zip (see http://www.7-zip.org) or use the build in unpack feature of modern Windows systems).

Now your environment is setup to generate the required project files for `doxygen`.

cd into the `doxygen-x.y.z` directory, create and cd to a build directory

    mkdir build
    cd build
    cmake -G "Visual Studio 12 2013"

Note that compiling Doxywizard currently requires Qt version 4 (see http://qt-project.org/).

Also read the next section for additional tools you may need to install to run doxygen with certain features enabled.

# Installing the binaries on Windows

Doxygen comes as a self-installing archive, so installation is extremely simple. Just follow the dialogs.

After installation it is recommended to also download and install GraphViz (version 2.20 or better is highly recommended). Doxygen can use the `dot` tool of the GraphViz package to render nicer diagrams, see the HAVE_DOT option in the configuration file.

If you want to produce compressed HTML files (see GENERATE_HTMLHELP) in the config file, then you need the Microsoft HTML help workshop. You can download it from Microsoft.

If you want to produce Qt Compressed Help files (see QHG_LOCATION) in the config file, then you need qhelpgenerator which is part of Qt. You can download Qt from Qt Software Downloads.

In order to generate PDF output or use scientific formulas you will also need to install LaTeX and Ghostscript.

For a number of distributions exists. Popular ones that should work with doxygen are MikTex and proTeXt.

Ghostscript can be downloaded from Sourceforge.

After installing and Ghostscript you'll need to make sure the tools latex.exe, pdflatex.exe, and gswin32c.exe are present in the search path of a command box. Follow these instructions if you are unsure and run the commands from a command box to verify it works.

Go to the next section or return to the index.