Use doxygen to generate API documentation under Ubuntu 12.04

**Some time ago, the company’s project required to follow the doxygen document specification, and the Doxygen 1.8.4 version was installed under Windows XP. It can be used to check whether the header file complies with the doxygen specification and some simple errors. In addition, you can also follow the C or C++ source code It is more convenient to generate the corresponding API document, especially when generating the html format. **

**For example, if you want to find API documents related to the source code of dbus, glib, etc., you can use the doxygen tool to generate the corresponding API documents from the source code of the downloaded open source software. **

doxygen also has an open source version of linux, the download address is as follows: http://sourceforge.net/projects/doxygen/

Doxygen website: 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 you are not familiar with English, you can refer to the introduction of doxygen on Baidu Encyclopedia for the time being: **http://baike.baidu.com/view/1502693.html

**Doxygen is an open source, cross-platform, document system described in a style similar to JavaDoc. It fully supports C, C++, Java, Objective-C and IDL languages, and partially supports PHP, C#. The comment syntax is compatible with Qt-Doc, KDoc and JavaDoc. Doxgen can start from a set of archives source files, generate HTML format online class Browser, or offline LATEX RTF reference manual. **

1. Use the apt-get install command under Ubuntu 12.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 about doxygen in the /usr/bin directory:

doxygen (command line tool)

doxytag

doxywizard (GUI wizard tool)

**2. Use doxygen under Ubuntu 12.04 to generate API documentation from the downloaded source code. ****1. Download the source code D-Bus-1.6.10 from the blfs website http://www.linuxfromscratch.org/blfs/view/svn/general/dbus.html, the link is: ** http://dbus.freedesktop.org/releases/dbus/dbus-1.6.10.tar.gz**, this website has many ready-made Linux commonly used software. **

**2、 Ctrl+Alt+T to open the terminal, enter doxywizard, the following doxygen GUI interface will pop up, which is similar to the doxygen used under Windows XP. **

2、 Unzip the just downloaded dbus-1.6.10.tar.gz

Enter the directory where dbus-1.6.10.tar.gz is downloaded, and use the following command to decompress:

tar -xzvf dbus-1.6.10.tar.gz

Or select dbus-1.6.10.tar.gz, right-click, and select [Extract here].

**3、 Configure the options of the dbus project, such as: doxygen script configuration file storage path, doxygen API document storage path, project name, version number and other information. **

In the working directory, for example, /home/ccf/Downloads, create a tmp directory to store the doxygen script configuration files, create a dbus-html-docs directory to store the output dbus API documents, and decompress the dbus-1.6.10 source code Also move to this directory, and perform the following configuration in the doxygen gui interface that pops up in step 1:

It can be seen from the above configuration:

The storage path of the doxygen API configuration script is: /home/ccf/Downloads/tmp

The project name is: dbus

The version number is: 1.6.10

The directory where the source code is located is: /home/ccf/Downloads/dbus-1.6.10

Doxygen API document output path: /home/ccf/Downloads/dbus-html-docs

In addition, note that the [Scan recursively] radio button above must be selected, otherwise the corresponding doxygen API documentation will not be generated.

4、 Run the configuration script to generate doxygen documentation

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

5、 Check the generated dbus API documentation reference manual,

You can directly click the [Show HTML output] button on the Run doxygen Tab page in step 4 to view the dbus API html format document.

Or directly enter the dbus API document result output directory, enter the html directory, namely /home/ccf/Downloads/dbus-html-docs/html/, find index.html and double-click to open it, as shown below:

You can see information about dbus API, dbus introduction, modules, classes, files, etc.

There is also a Mac GUI instruction for the Doxywizard command tool. You can look at it against Ubuntu 12.04 and find that the Doxygen tool interface under Windows, Ubuntu 12.04, and Mac is similar, and the usage is similar. The website is: http://www.stack.nl/~dimitri/doxygen/manual/doxywizard_usage.html

**Download the source code later, if you can’t find the official documentation, or the online introduction is not detailed enough, you can use doxygen to generate the corresponding API reference manual, but the prerequisite is that the document is written in compliance with the doxygen code specification! **

Recommended Posts

Use doxygen to generate API documentation under Ubuntu 12.04
Summary of methods to use Evernote under Ubuntu 14.04
Use iptables under ubuntu
Use of mediawiki under ubuntu
Use virtualbox to deploy ubuntu
Use expect to realize screen multi-window boot operation under ubuntu
How to use hanlp in ubuntu
How to compile ijkplayer-android under ubuntu
How to install Audacious under Ubuntu
How to install Tensorflow under ubuntu 16.04
How to use Samba server on Ubuntu 16.04
Use Python to generate Douyin character videos!
Use python3 to install third on ubuntu
Three ways to install software under Ubuntu
How to change MySQL password under Ubuntu
windows use ubuntu to start linux service
How to install vim editor under Linux (Ubuntu 18.04)
How to use Prometheus to monitor your Ubuntu 14.04 server
How to configure TensorFlow use environment in Ubuntu
Installation of pulseaudio and API usage under Ubuntu 12.04
How to use Nginx's map module on Ubuntu 16.04
How to install and use Docker on Ubuntu 20.04
The solution to the failure to install .deb under Ubuntu 16.04
How to use dpkg command in Ubuntu system
How to install and use Curl on Ubuntu 18.04
How to install and use Wine on Ubuntu 18.04
How to use Docker data volumes on Ubuntu 14.04
How to install and use Composer on Ubuntu 20.04
How to install and use BaasBox on Ubuntu 14.04
Publish the node.js project under Ubuntu to heroku
Steps to add toolkit for Matlab_Linux under ubuntu
How to use Jenkins to build automatically on Ubuntu
How to install and use PostgreSQL on Ubuntu 16.04
Add a new project to SVN under Ubuntu
Introduction to the use of Hanlp in ubuntu
Solution to pycharm unable to import classes under Ubuntu
How to enable Mysql remote access under Ubuntu 14.04
How to install gcc compiler faster under Ubuntu
How to install and use Docker on Ubuntu 16.04
Ubuntu use notes
ubuntu zip/unzip use
How to repackage Deb files under Debian and Ubuntu
How to create and use MongoDB backups on Ubuntu 14.04
Use Rancher to build a K8s cluster under CentOS7
Use the command line to detect the Ubuntu version method
Use Cobbler to automate batch deployment of CentOS / Ubuntu
Installation and use of GDAL in Python under Ubuntu
How to install and use MySQL Workbench on Ubuntu 18.04
How to use Putty to log in to ubuntu installed in VirtualBox
Cpp web (1) Install and use Crow service under Ubuntu
How to install two versions of OpenCV under ubuntu?
How to open https on nginx server under Ubuntu