Doxygen – Documentation Builder

Doxygen

Generate documentation from source code

Doxygen is the standard tool for generating documentation from annotated C++ sources, but it also supports other popular programming languages such as C, Objective-C, C#, PHP, Java, Python, IDL (Corba and Microsoft flavors), Fortran, VHDL, Tcl, and to some extent D.

Installation

Run following command in terminal:

$ sudo apt-get install doxygen

Usage

It’s very simple to use. Just type $ doxygen in terminal and you got its manual.

For using comments format is very important. So before start check its comment instructions.

To create documentation, move to folder where your source file exits through terminal and then type

$ cd /path/to/your/project/source/
$ doxygen -g [filename]

You can fill any filename as your choice. Its configuration file and you can edit that according your project details like change project name in filename.(config file for doxygen)

Then run

$ doxygen [filename]

By this your documentation will be generated. This will create 2 folders in your current directory.
Folders:

  • html for html documentation open /path/to/project/source/html/index.html to check documentation.
  • latex for documentation using latex as pdf output. For that file run

    $ cd /path/to/your/project/source/latex
    $ make

This will create refman.pdf file(check pdf file as file name may be changed in your case).

That’s all. This is basic guide, you can do more by exploring filename.conf file.
You can also add Special Commands in comments to make your documentation more descriptive.

Hope this will help you.