Installation and use of Linux Doxygen

Source: Internet
Author: User
Tags doxygen

First, Introduction

Doxygen is an open-source, cross-platform, document system that is described in a similar Javadoc style, fully supported in C, C + +, Java, objective-c, and IDL languages, partially supported by PHP, C #. The syntax for annotations is compatible with Qt-doc, KDOC, and Javadoc. Doxgen can start with a set of archive source files, generate an HTML-formatted online class browser, or an offline latex, RTF reference manual.

Second, installation

To install the Doxygen and the graphical tool Graphviz for supporting Doxygen, proceed as follows:

1, installation Doxygen

1. Download resources: doxygen-1.7.4.linux.bin.tar.gz

http://www.stack.nl/~dimitri/doxygen/download.html

2. Compile and install

1)  tar xvfz doxygen-1.7. 4. Linux.bin. Tar . GZ 2)  CD doxygen-1.7. 4 3)  . /Configure4) make   5) make   Install

Reference: http://blog.chinaunix.net/uid-21809556-id-1814825.html

2, Installation Graphviz

1. Execute the following command to complete the installation

Yum Install Graphviz

Third, the use of configuration

1. Generate configuration files in Project engineering directory

CD test/            #进入项目目录 (test for example) doxygen–g         #生成配置文件

Tips:

1 " Doxyfile ", you can also specify the generated profile name:doxygen-g your-cfg-filename
2 " - S " option to generate a profile with no annotations:DOXYGEN-SG

2. Modify the configuration file as needed

The template is as follows:

# project name, will be used as the generated program document first page title Project_Name=the test# document version number, which corresponds to the project version number, such as SVN, CVS generated project version number Project_number="1.0.0# program Document output directory Output_directory= doc/# Program Document language environment Output_language=chinese# If you are making a C program document, this option must be set to YES, otherwise the default generation C++Document Format Optimize_output_for_c=yes# for data types that use typedef-defined structures, enumerations, unions, and so on, only the type names defined by typedef are documented typedef_hides_struct=yes# in C+ + program documentation, this value can be set to No, while in the C program document, because C language does not have the so-called domain/namespaces, so this is set to Yeshide_scope_names=yes# let Doxygen silently generate documents for you, only in the event of a warning or error, the terminal output prompt information quiet=yes# The document information in the header file to generate the program document File_patterns= *the. h# recursively iterates through the subdirectories of the current directory, looking for a documented program source file recursive=yes# Sample program directory Example_path= example/# The header document (. h file) of the sample program and the implementation document (. c file) are documented objects as programs Example_patterns= *. C*the. h# recursively iterates through the subdirectories of the sample program directory, looking for a documented program source file Example_recursive=yes# allows the program document to display this documented function call relationship referenced_by_relation=yesreferences_relation=Yesreferences_link_source=yes# does not generate a Latex-formatted program document GENERATE_LATEX=no# allows the function call relationship to be displayed as a legend in the program documentation, provided that you have installed the Graphviz package Have_dot=Yescall_graph=Yescaller_graph=YES#在最后生成的文档中, put all the source code contained therein in source BROWSER=yes$ This adds a sidebar to the HTML document, and displays the relationships of packages, classes, interfaces, and so on in a tree-like structure generate TREEVIEW = All

3. Documentation of program annotations

Using Doxygen, you need to follow the Doxygen game rules to document the program source code.

The annotation types of Doxygen can be divided into:

1 , between the lines note: The comment statement does not appear with the program source code on the same line, mainly for the comment header file appears in the structure (struct), enumeration (enum), Union (uion) and other data types, as well as the function of the program interface and the use of conventions; 2, in-line comment: The comment statement and the program source code appears in the same line, mainly for the local comments of the codes.

Detailed syntax reference: http://www.stack.nl/~dimitri/doxygen/manual/docblocks.html

4. Document Generation

CD test/Doxygen

Tips:

You can specify a profile name: Doxygen  your-cfg-filename

5. Use of documents

The resulting document is located in the test/doc/html directory, and you can see your work by opening the index.html file in that directory using your browser.

Installation and use of Linux Doxygen

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.