If you downloaded the source distribution, you need at least the following to build the executable:
To take full advantage of doxygen's features the following additional tools should be installed.
Compilation is now done by performing the following steps:
gunzip doxygen-$VERSION.src.tar.gz # uncompress the archive tar xf doxygen-$VERSION.src.tar # unpack it
sh ./configure
The script tries to determine the platform you use, the location of the Qt library, the make tool (which must be GNU make) and the perl interpreter. It will report what it finds.
To override the auto detected platform and compiler you can run configure as follows:
configure --platform platform-type
See the PLATFORMS
file for a list of possible platform options.
If you have Qt-2.1.x installed and want to build the GUI front-end, you should run the configure script with the --with-doxywizard
option:
configure --with-doxywizard
For an overview of other configuration options use
configure --help
make
The program should compile without problems and three binaries (doxygen
, doxytag
, and doxysearch
) should be available in the bin directory of the distribution.
make docs
To let doxygen generate the HTML documentation.
sed
for this, but this should be available on any Unix platform.
index.html
in the html directory).
latex
and dvips
and the ghostscript package for this).
make pdf
The postscript manual doxygen_manual.ps
will be located in the latex directory of the distribution. Just send it to a postscript printer to print it or use ghostview
to view it.
Installating the binaries on Unix
If you downloaded the binary distribution for Unix, you can install doxygen by typing:
./configure make install
Binaries are installed in the directory <prefix>/bin
Documentation and examples in the directory <prefix>/doc/doxygen
<prefix>
defaults to /usr but can be changed with the --prefix
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.
Known compilation problems for Unix
Qt problems
The Qt include files and libraries are not a sub directory 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)
The solution: goto the root of the doxygen distribution and do:
mkdir qt cd qt ln -s your-qt-include-dir-here include ln -s your-qt-lib-dir-here lib export QTDIR=$PWD
If you have a csh-like shell you should use setenv QTDIR $PWD
instead of the export
command above.
Now install doxygen as described above.
Latex problems
the file a4wide.sty
is not available for all distributions. If your distribution does not have it please select another paper type in the config file (see the PAPER_TYPE tag in the config file).
HP-UX & Digital Unix problems
If you are compiling for HP-UX with aCC and you get this error:
/opt/aCC/lbin/ld: Unsatisfied symbols: alloca (code)
ce_parse.cpp
and replace extern "C" { void *alloca (unsigned int); };
#include <alloca.h>
If that does not help, try removing ce_parse.cpp
and let bison rebuilt it (this worked for me).
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:
#else /* not GNU C. */ #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) #include <alloca.h>
with
#else /* not GNU C. */ #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || defined (__osf__) #include <alloca.h>
Alternatively, one could fix the problem at the bison side. Here is patch for bison.simple (provided by Andre Johansen):
--- 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__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) +#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || defined (__alpha) #include <alloca.h> #else /* not sparc */ #if defined (MSDOS) && !defined (__TURBOC__)
The generated scanner.cpp that comes with doxygen is build with this patch applied.
Sun compiler problems
I tried compiling doxygen only with Sun's C++ WorkShop Compiler version 5.0 (I used ./configure --platform solaris-cc
)
Qt-2.x.x is required for this compiler (Qt-1.44 has problems with the bool type).
Compiling the doxygen
binary went ok, but while linking doxytag
I got a lot of link errors, like these:
QList<PageInfo>::__vtbl /home/dimitri/doxygen/objects/SunWS_cache/CC_obj_6/6c3eO4IogMT2vrlGCQUQ.o [Hint: try checking whether the first non-inlined, non-pure virtual function of class QList<PageInfo> is defined]
These are generated because the compiler is confused about the object sharing between doxygen
and doxytag
. To compile doxytag
and doxysearch
anyway do:
rm -rf objects mkdir objects cd src gmake -f Makefile.doxytag gmake -f Makefile.doxysearch
when configuring with --static
I got:
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)
Manually adding -Bdynamic
after the target rule in Makefile.doxygen
and Makefile.doxytag
will fix this:
$(TARGET): $(OBJECTS) $(OBJMOC) $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) -Bdynamic
GNU 2.7.2.x compiler problems
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 --english-only
option.
Compiling from source on Windows
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 wintools/make.pl
a bit. Let me know what you had to change if you got Doxygen working with another compiler.
Since Windows comes without all the nice tools that Unix users are used to, you need to install a number of these tools before you can compile doxygen for Windows.
Here is what is required:
vcvars32.bat
batch file to set the environment variables (if you did not select to do this automatically during installation).
Make sure the BISONLIB
environment variable points to the location where the files bison.simple
and bison.hairy
are located.
Also make sure the tools are available from a dos box, by adding the directory they are in to the search path.
If you do not have that and you can live without the GUI front-end you can also download Qt-1.44 for X11. Doxygen only the depends on the tools section of the Qt library, which happens also to compile on Windows. (Qt version 2.1.x does not work anymore, at least not without adding some window's specific code).
Now create the following directories:
qtools/src qtools/include qtools/lib
Copy the contents of the src/tools
directory of the Qt-1.44 for X11 archive to qtools/src
. Also copy the include files in src/tools
to qtools/include
. Create a static library project resulting in qtools/lib/qt.lib
and add the files in qtools/src
to that project. Then build the library and set the environment variable QTDIR
to the absolute path of the qtools directory.
Make sure the tools are available from a dos box, by adding the directory they are in to the search path.
objects
and bin
manually in the root of the distribution before compiling. Compilation is now done by performing the following steps:
nmake
, latex
, gswin32
, dvips
, sed
, flex
, bison
, cl
, rm
and perl
), are accessible from the command-line (add them to the PATH environment variable if needed).
make.bat
This should build the executables doxygen.exe
, doxytag.exe
, and doxysearch.exe
(The compiler should not produce any serious warnings or errors).
nmake examples
nmake docs
The generated docs are located in the html directory.
nmake pdf
The manual should now be in latex/doxygen_manual.pdf
Installating the binaries on Windows
There is no fancy installation procedure at the moment (If anyone wants to add it please let me know).
To install doxygen, just copy the binaries from the bin
directory to a location somewhere in the path. Alternatively, you can include the bin
directory of the distribution to the path.
Doxygen was developed and tested under Linux using the following open-source tools:
Go to the next section or return to the index.