Use doxygen to generate API documentation in ubuntu12.04

Source: Internet
Author: User
Tags doxygen gz file

Some time ago, the company implemented project requirements to comply with the doxygen documentation specification, and installed doxygen 1.8.4 in Windows XP. When using the documentation, we can check whether the header file complies with the doxygen specification and some simple errors, you can also generate corresponding API documents based on C or C ++ source code, especially HTML format.

For example, you can use the doxygen tool to generate the corresponding API documentation for the source code of the downloaded open-source software.

Doxygen also has the Linux open source version, as follows: http://sourceforge.net/projects/doxygen/

Doxygen Web site: http://www.stack.nl /~ Dimitri/doxygen/index.html

Http://www.doxygen.org/

Doxygen Manual: http://www.stack.nl /~ Dimitri/doxygen/manual/index.html

Documenting the Code:
Http://www.stack.nl /~ Dimitri/doxygen/manual/docblocks.html # docstructure

If not used to English, can refer to Baidu encyclopedia about doxygen Introduction: http://baike.baidu.com/view/1502693.html

Doxygen is an open-source cross-platform documentation system similar to javadoc. It fully supports C, C ++, Java, objective-C, and IDL languages, some support PHP and C #. The annotation syntax is compatible with QT-Doc, kdoc, and javadoc. Doxgen can generate HTML-format online browsers or offline latex and RTF reference manuals from a set of archive source files.

1. Run the apt-Get install command in ubuntu12.04 to install the doxygen command line tool and the corresponding GUI tool. The command is as follows:

Sudo apt-Get install doxygen

Sudo apt-Get install doxygen-Gui

After installation, there are three command tools for doxygen in the/usr/bin directory:

Doxygen (command line tool)

Doxytag

Doxywizard (GUI wizard tool)

2. Use doxygen in ubuntu12.04 to generate the API documentation for the downloaded source code.
1. refer from the blfs website.

2. Press CTRL + ALT + T to open the terminal and enter doxywizard. The following doxygen GUI is displayed, which is similar to doxygen used in Windows XP.

2. decompress the downloaded dbus-1.6.10.tar.gz file.

Run the following command to decompress the directory where dbus-1.6.10.tar.gz is downloaded:

Tar-xzvf dbus-1.6.10.tar.gz

Right-click dbus-1.6.10.tar.gz and select extract here.

3. Configure the routing project options, such as the doxygen script configuration file storage path, doxygen API file storage path, project name, version number, and other information.

Create the tmp directory under the working directory, for example,/home/CCF/downloads, store the doxygen script configuration file, and create the export-HTML-docs directory to store the output producer API documentation, in addition, the decompressed dbus-1.6.10 source code is also moved to this directory, in step 1 pop-up doxygen GUI interface for the following Configuration:

From the configuration above, we can see that:

The path for storing the doxygen API configuration script is/home/CCF/downloads/tmp.

Project name: Workshop

Version: 1.6.10

Source code Directory:/home/CCF/downloads/dbus-1.6.10

Doxygen API documentation output path:/home/CCF/downloads/Alibaba-HTML-docs

In addition, note that the scan recursively option must be selected. Otherwise, the corresponding doxygen API document cannot be generated.


4. Run the configuration script to generate the doxygen document.

Select the run tab and click Run doxygen to generate the doxygen API documentation, as shown in:

5. view the generated producer api reference manual,

You can click the show HTML output button on the "run doxygen" tab page in step 1 to view the documentation in the HTML format of APIs.

You can also directly go to the export API result output directory and enter the HTML directory, that is,/home/CCF/downloads/export-HTML-docs/html/. Find index.html and double-click it, as shown below:

You can view the producer API information, including the introduction, modules, classes, and files of the producer.

There is also a doxywizard command tool Mac GUI instructions, you can take a look at the ubuntu12.04, we found that the windows, ubuntu12.04, and Mac doxygen tool interfaces are similar, use is also similar, http://www.stack.nl /~ Dimitri/doxygen/manual/doxywizard_usage.html

Download the source code in the future. If you cannot find the official instructions, or do not provide detailed information online, you can use doxygen to generate the corresponding API reference manual, however, it is recommended that the written documents comply with the doxygen code specifications!


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.