ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux

Compiling from source on UNIX

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:

Run cmake with the makefile generator

cmake tries to determine the platform you use, and will look for the requires tools. It will report if something is missing.

If you have Qt-4.3 or higher installed and want to build the GUI front-end, you should enable it as follows:

For an overview of other configuration options use

Compile the program by running make:

The program should compile without problems and the binaries ( doxygen and optionally doxywizard ) should be available in the bin directory within the build directory.

Optional: Generate the user manual.

To let doxygen generate the HTML and PDF documentation.

The HTML directory within the build directory will now contain the html documentation (just point a HTML browser to the file index.html in the html directory).

Optional: static linking

If you want to build a statically linked version of doxygen that embeds libclang you need to first build LLVM and clang from sources using the following options:

and then build doxygen with these options:

Installing the binaries on UNIX

After the compilation of the source code do a make install to install doxygen. If you downloaded the binary distribution for Linux, type:

Note You need the GNU install tool for this to work (it is part of the coreutils package). Other install tools may put the binaries in the wrong directory!

If you have a RPM or DEP package, then please follow the standard installation procedure that is required for these packages.

Compiling from source on Windows

From version 1.8.10 onwards, build files need to be generated by cmake. cmake can be downloaded from https://cmake.org/download/

At the moment only the express version of Visual Studio 2015 and 2017 are tested, but other version might also work.

Alternatively, you can compile doxygen the UNIX way using Cygwin or MinGW.

The next step is to install modern versions of bison and flex (see https://sourceforge.net/projects/winflexbison/. After installation and adding them to your path rename win_flex.exe to flex.exe and win_bison.exe to bison.exe ) Furthermore you have to install python (version 2.7 or higher, see https://www.python.org). These packages are needed during the compilation process.

Download doxygen’s source tarball and put it somewhere (e.g. use c:\tools )

Now start a visual studio native command shell (for either x86 or x64) and type

to unpack the sources (you can obtain tar from e.g. http://gnuwin32.sourceforge.net/packages.html). Alternatively you can use an unpack program, like 7-Zip (see https://www.7-zip.org/) or use the built-in unpack feature of modern Windows systems).

cd into the doxygen-x.y.z directory, create and cd to a build directory

This will create a project file then can be opened in Visual Studio.

If you prefer compiling from the command prompt you can use the following instead:

Note that compiling Doxywizard requires Qt 4.3 or newer (see https://www.qt.io/developers).

Also read the next section for additional tools you may need to install to run doxygen with certain features enabled.

Installing the binaries on Windows

Doxygen comes as a self-installing archive, so installation is extremely simple. Just follow the dialogs.

After installation it is recommended to also download and install GraphViz (version 2.38 or better is highly recommended). Doxygen can use the dot tool of the GraphViz package to render nicer diagrams, see the HAVE_DOT option in the configuration file.

If you want to produce compressed HTML files (see GENERATE_HTMLHELP) in the configuration file, then you need the Microsoft HTML help workshop. In the beginning of 2021 Microsoft took the original page, with a.o. the download links, offline the HTML help workshop was already many years in maintenance mode). You can download the HTML help workshop from the web archives at Installation executable.

If you want to produce Qt Compressed Help files (see QHG_LOCATION) in the configuration file, then you need qhelpgenerator which is part of Qt. You can download Qt from Qt Software Downloads.

In order to generate PDF output or use scientific formulas you will also need to install LaTeX and Ghostscript.

For ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π€ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linuxa number of distributions exists. Popular ones that should work with doxygen are MikTex and proTeXt.

Ghostscript can be downloaded from Sourceforge.

After installing ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π€ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linuxand Ghostscript you’ll need to make sure the tools latex.exe, pdflatex.exe, and gswin32c.exe (or gswin64c.exe) are present in the search path of a command box. Follow these instructions if you are unsure and run the commands from a command box to verify it works.

Go to the next section or return to the index.

Π˜ΡΡ‚ΠΎΡ‡Π½ΠΈΠΊ

Записки программиста

Π“Π΅Π½Π΅Ρ€ΠΈΡ€ΡƒΠ΅ΠΌ Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚Π°Ρ†ΠΈΡŽ ΠΊ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π°ΠΌ Π½Π° C/C++ с Doxygen

ΠŸΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠΈΡΡ‚Ρ‹, ΠΊΠ°ΠΊ ΠΏΡ€Π°Π²ΠΈΠ»ΠΎ, Π½Π΅ ΠΎΡ‡Π΅Π½ΡŒ Π»ΡŽΠ±ΡΡ‚ ΠΏΠΈΡΠ°Ρ‚ΡŒ тСсты. Но ΠΊΡƒΠ΄Π° сильнСС ΠΎΠ½ΠΈ Π½Π΅ Π»ΡŽΠ±ΡΡ‚ ΠΏΠΈΡΠ°Ρ‚ΡŒ Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚Π°Ρ†ΠΈΡŽ. ВСсты хотя Π±Ρ‹ ΠΏΡ€Π΅Π΄ΡΡ‚Π°Π²Π»ΡΡŽΡ‚ собой ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹, Π° докумСнтация β€” это Ρ‡Ρ‚ΠΎ? ΠŸΡ€ΠΎΡΡ‚ΠΎ тСкст. Π’ΠΎΡ‚ ΠΏΡƒΡΡ‚ΡŒ ΠΊΡ‚ΠΎ-Π½ΠΈΠ±ΡƒΠ΄ΡŒ Π΄Ρ€ΡƒΠ³ΠΎΠΉ Π΅Π³ΠΎ ΠΈ ΠΏΠΈΡˆΠ΅Ρ‚, тСхничСскиС писатСли Π½Π°ΠΏΡ€ΠΈΠΌΠ΅Ρ€! Π’ΠΏΡ€ΠΎΡ‡Π΅ΠΌ, Ссли Ρ€Π΅Ρ‡ΡŒ ΠΈΠ΄Π΅Ρ‚ Π½Π΅ ΠΎ ΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»ΡŒΡΠΊΠΎΠΉ Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚Π°Ρ†ΠΈΠΈ, Π° ΠΎΠ± описании классов ΠΈ ΠΌΠ΅Ρ‚ΠΎΠ΄ΠΎΠ², ΠΏΡ€Π΅Π΄Π½Π°Π·Π½Π°Ρ‡Π΅Π½Π½ΠΎΠΌ для Π΄Ρ€ΡƒΠ³ΠΈΡ… программистов, Ρ‚ΡƒΡ‚ ΠΎΡ‚ΠΊΠΎΡΠΈΡ‚ΡŒ вряд Π»ΠΈ удастся. К ΡΡ‡Π°ΡΡ‚ΡŒΡŽ, Π΅ΡΡ‚ΡŒ Doxygen, способный сущСствСнно ΠΏΠΎΠΌΠΎΡ‡ΡŒ со ΡΡ‚ΠΎΠ»ΡŒ нСприятной для ΠΌΠ½ΠΎΠ³ΠΈΡ… Ρ€Π°Π±ΠΎΡ‚ΠΎΠΉ.

Fun fact! НСсмотря Π½Π° Ρ‚ΠΎ, Ρ‡Ρ‚ΠΎ Π² Ρ€Π°ΠΌΠΊΠ°Ρ… этого поста ΠΌΡ‹ Π±ΡƒΠ΄Π΅ΠΌ Π³ΠΎΠ²ΠΎΡ€ΠΈΡ‚ΡŒ ΠΎ Doxygen ΠΈΡΠΊΠ»ΡŽΡ‡ΠΈΡ‚Π΅Π»ΡŒΠ½ΠΎ Π² контСкстС языков C ΠΈ C++, ΠΎΠ½ Ρ‚Π°ΠΊΠΆΠ΅ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΈΠ²Π°Π΅Ρ‚ языки Java, Python, PHP, ΠΈ Π΄Ρ€ΡƒΠ³ΠΈΠ΅.

Установка Doxygen осущСствляСтся ΠΊΠ°ΠΊ-Ρ‚ΠΎ Ρ‚Π°ΠΊ:

# Ссли Ρƒ вас Ubuntu:
sudo apt-get install doxygen

Π”Π°Π»Π΅Π΅ ΠΏΠ΅Ρ€Π΅Ρ…ΠΎΠ΄ΠΈΠΌ Π² ΠΊΠ°Ρ‚Π°Π»ΠΎΠ³ с нашим ΠΏΡ€ΠΎΠ΅ΠΊΡ‚ΠΎΠΌ ΠΈ создаСм ΡˆΠ°Π±Π»ΠΎΠ½Π½Ρ‹ΠΉ Ρ„Π°ΠΉΠ» Doxyfile ΠΊΠΎΠΌΠ°Π½Π΄ΠΎΠΉ:

Π’ Doxyfile содСрТится ΠΊΡ€Π°Ρ‚ΠΊΠΎΠ΅ описаниС ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π°, Π΅Π³ΠΎ вСрсия ΠΈ ΠΏΠΎΠ΄ΠΎΠ±Π½Ρ‹Π΅ Π²Π΅Ρ‰ΠΈ. Π‘Π»Π΅Π΄ΡƒΡŽΡ‰ΠΈΠ΅ значСния стоит сразу ΠΈΠ·ΠΌΠ΅Π½ΠΈΡ‚ΡŒ.

ΠšΡ€Π°Ρ‚ΠΊΠΎΠ΅ описаниС ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π°:

ΠšΡƒΠ΄Π° ΠΏΠΈΡΠ°Ρ‚ΡŒ сгСнСрСнныС Π΄ΠΎΠΊΠΈ:

ΠžΡ‚ΠΊΠ»ΡŽΡ‡Π°Π΅ΠΌ LaTeX, Ρ‚Π°ΠΊ ΠΊΠ°ΠΊ HTML ΠΎΠ±Ρ‹Ρ‡Π½ΠΎ достаточно:

Π“Π΄Π΅ ΠΈΡΠΊΠ°Ρ‚ΡŒ Ρ„Π°ΠΉΠ»Ρ‹, ΠΈΠ· ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Ρ… Π³Π΅Π½Π΅Ρ€ΠΈΡ€ΠΎΠ²Π°Ρ‚ΡŒ Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚Π°Ρ†ΠΈΡŽ β€” список Ρ„Π°ΠΉΠ»ΠΎΠ² ΠΈ Π΄ΠΈΡ€Π΅ΠΊΡ‚ΠΎΡ€ΠΈΠΉ Ρ‡Π΅Ρ€Π΅Π· ΠΏΡ€ΠΎΠ±Π΅Π»:

Π’ΠΊΠ»ΡŽΡ‡Π°Π΅ΠΌ рСкурсивный ΠΎΠ±Ρ…ΠΎΠ΄ Π΄ΠΈΡ€Π΅ΠΊΡ‚ΠΎΡ€ΠΈΠΉ:

ВсСго Π² Ρ„Π°ΠΉΠ»Π΅ ΠΎΠΊΠΎΠ»ΠΎ 2500 строк с ΠΏΠΎΠ΄Ρ€ΠΎΠ±Π½Ρ‹ΠΌ описаниСм всСх ΠΏΠ°Ρ€Π°ΠΌΠ΅Ρ‚Ρ€ΠΎΠ². Однако ΠΏΠΎΠΌΠΈΠΌΠΎ ΠΏΡ€ΠΈΠ²Π΅Π΄Π΅Π½Π½Ρ‹Ρ… Π²Ρ‹ΡˆΠ΅ ΠΏΠ°Ρ€Π°ΠΌΠ΅Ρ‚Ρ€ΠΎΠ² Π²Π°ΠΌ вряд Π»ΠΈ придСтся Ρ‡Ρ‚ΠΎ-Ρ‚ΠΎ ΠΌΠ΅Π½ΡΡ‚ΡŒ.

ΠŸΡ€Π°Π²ΠΈΠ»Π° Ρ…ΠΎΡ€ΠΎΡˆΠ΅Π³ΠΎ Ρ‚ΠΎΠ½Π° гласят, Ρ‡Ρ‚ΠΎ для ΠΊΠ°ΠΆΠ΄ΠΎΠΉ ΠΏΡ€ΠΎΡ†Π΅Π΄ΡƒΡ€Ρ‹ ΠΈΠ»ΠΈ ΠΌΠ΅Ρ‚ΠΎΠ΄Π° класса (нСзависимо ΠΎΡ‚ Ρ‚ΠΎΠ³ΠΎ, ΠΏΡƒΠ±Π»ΠΈΡ‡Π½Ρ‹Π΅ ΠΎΠ½ΠΈ ΠΈΠ»ΠΈ ΠΏΡ€ΠΈΠ²Π°Ρ‚Π½Ρ‹Π΅) Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ ΠΊΠ°ΠΊ ΠΌΠΈΠ½ΠΈΠΌΡƒΠΌ ΠΊΡ€Π°Ρ‚ΠΊΠΎΠ΅ описаниС Ρ‚ΠΎΠ³ΠΎ, Ρ‡Ρ‚ΠΎ Π΄Π΅Π»Π°Π΅Ρ‚ ΠΏΡ€ΠΎΡ†Π΅Π΄ΡƒΡ€Π° ΠΈΠ»ΠΈ ΠΌΠ΅Ρ‚ΠΎΠ΄, описаниС ΠΊΠ°ΠΆΠ΄ΠΎΠ³ΠΎ ΠΈΠ· Π°Ρ€Π³ΡƒΠΌΠ΅Π½Ρ‚ΠΎΠ², Π° Ρ‚Π°ΠΊΠΆΠ΅ описаниС Π²ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅ΠΌΠΎΠ³ΠΎ значСния. Если ΠΌΠ΅Ρ‚ΠΎΠ΄ Π΄Π΅Π»Π°Π΅Ρ‚ Π΅Ρ‰Π΅ Ρ‡Ρ‚ΠΎ-Ρ‚ΠΎ, Π½Π°ΠΏΡ€ΠΈΠΌΠ΅Ρ€, ΠΊΠ°ΠΊ-Ρ‚ΠΎ мСняСт состояниС класса, это Ρ‚Π°ΠΊΠΆΠ΅ ΠΎΠ±ΡΠ·Π°Ρ‚Π΅Π»ΡŒΠ½ΠΎ Π½ΡƒΠΆΠ½ΠΎ Π·Π°Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚ΠΈΡ€ΠΎΠ²Π°Ρ‚ΡŒ.

Аналогично, ΠΊΡ€Π°Ρ‚ΠΊΠΎΠ΅ описаниС Ρ‚ΠΎΠ³ΠΎ, Ρ‡Ρ‚ΠΎ ΠΎΠ½ΠΈ ΠΈΠ· сСбя ΠΏΡ€Π΅Π΄ΡΡ‚Π°Π²Π»ΡΡŽΡ‚, Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ Ρƒ самих классов ΠΈ структур. НС лишним Π±ΡƒΠ΄Π΅Ρ‚ Ρ€Π°ΡΡΠΊΠ°Π·Π°Ρ‚ΡŒ, являСтся Π»ΠΈ класс ΠΊΠΎΠΏΠΈΡ€ΡƒΠ΅ΠΌΡ‹ΠΌ ΠΈΠ»ΠΈ thread-safe. ΠšΡ€Π°Ρ‚ΠΊΠΎΠ΅ описаниС Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ Ρƒ ΠΊΠ°ΠΆΠ΄ΠΎΠ³ΠΎ Π°Ρ‚Ρ€ΠΈΠ±ΡƒΡ‚Π° класса.

Π’ Π΄Π΅ΠΉΡΡ‚Π²ΠΈΡ‚Π΅Π»ΡŒΠ½ΠΎΡΡ‚ΠΈ, Doxygen ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΈΠ²Π°Π΅Ρ‚ ΠΊΡƒΠ΄Π° большС ΠΊΠΎΠΌΠ°Π½Π΄. НапримСр, ΠΎΠ½ позволяСт ΠΏΠΈΡΠ°Ρ‚ΡŒ ΠΌΠ½ΠΎΠ³ΠΎΡΡ‚Ρ€Π°Π½ΠΈΡ‡Π½ΡƒΡŽ ( @page ) Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚Π°Ρ†ΠΈΡŽ с Ρ€Π°Π·Π΄Π΅Π»Π°ΠΌΠΈ ( @section ) ΠΈ ΠΏΠΎΠ΄Ρ€Π°Π·Π΄Π΅Π»Π°ΠΌΠΈ ( @subsection ), ΡƒΠΊΠ°Π·Ρ‹Π²Π°Ρ‚ΡŒ вСрсии ΠΌΠ΅Ρ‚ΠΎΠ΄ΠΎΠ² ΠΈ классов ( @version ), ΠΈ Π½Π΅ Ρ‚ΠΎΠ»ΡŒΠΊΠΎ. ΠžΠ·Π½Π°ΠΊΠΎΠΌΠΈΡ‚ΡŒΡΡ с ΠΏΠΎΠ»Π½Ρ‹ΠΌ списком ΠΊΠΎΠΌΠ°Π½Π΄ ΠΌΠΎΠΆΠ½ΠΎ здСсь.

Fun fact! Doxygen ΠΏΠΎΠ½ΠΈΠΌΠ°Π΅Ρ‚ Markdown Π² коммСнтариях. ΠšΡ€Π°Ρ‚ΠΊΡƒΡŽ ΡˆΠΏΠ°Ρ€Π³Π°Π»ΠΊΡƒ ΠΏΠΎ Markdown Π²Ρ‹ Π½Π°ΠΉΠ΄Π΅Ρ‚Π΅ Π² Π·Π°ΠΌΠ΅Ρ‚ΠΊΠ΅ ΠΏΡ€ΠΎ созданиС статичСского Π±Π»ΠΎΠ³Π° Π½Π° Pelican.

Для Π³Π΅Π½Π΅Ρ€Π°Ρ†ΠΈΠΈ ΠΈ просмотра Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚Π°Ρ†ΠΈΠΈ просто Π³ΠΎΠ²ΠΎΡ€ΠΈΠΌ:

Если вас ΠΈΠ½Ρ‚Π΅Ρ€Π΅ΡΡƒΡŽΡ‚ ΠΊΠΎΠ½ΠΊΡ€Π΅Ρ‚Π½Ρ‹Π΅ ΠΏΡ€ΠΈΠΌΠ΅Ρ€Ρ‹, Ρ€Π΅ΠΊΠΎΠΌΠ΅Π½Π΄ΡƒΡŽ ΠΏΠΎΡΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚Π°Ρ†ΠΈΡŽ ΠΏΠΎ libevent, wxWidgets ΠΈΠ»ΠΈ Assimp. Π›ΡŽΠ±ΠΎΠΉ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚ ΠΊΡƒΠ΄Π° ΠΏΡ€ΠΎΡ‰Π΅ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΈΠ²Π°Ρ‚ΡŒ, Ссли Ρƒ Π½Π΅Π³ΠΎ Π΅ΡΡ‚ΡŒ такая ΠΆΠ΅ классная докумСнтация!

А ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠ΅Ρ‚Π΅ Π»ΠΈ Π²Ρ‹ Doxygen, ΠΈ Ρ‡Ρ‚ΠΎ Π² Ρ†Π΅Π»ΠΎΠΌ ΠΎ Π½Π΅ΠΌ Π΄ΡƒΠΌΠ°Π΅Ρ‚Π΅?

Π”ΠΎΠΏΠΎΠ»Π½Π΅Π½ΠΈΠ΅: Вас Ρ‚Π°ΠΊΠΆΠ΅ ΠΌΠΎΠΆΠ΅Ρ‚ Π·Π°ΠΈΠ½Ρ‚Π΅Ρ€Π΅ΡΠΎΠ²Π°Ρ‚ΡŒ пост ΠŸΠΎΡΡ‚Ρ€ΠΎΠ΅Π½ΠΈΠ΅ UML-Π΄ΠΈΠ°Π³Ρ€Π°ΠΌΠΌ с ΠΏΠΎΠΌΠΎΡ‰ΡŒΡŽ PlantUML. Π’ Doxygen имССтся ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° PlantUML.

Π˜ΡΡ‚ΠΎΡ‡Π½ΠΈΠΊ

How to generate documentation from source code in Linux

Last updated on September 9, 2020 by Dan Nanni

If you are an open-source developer and want to release your project to the public, you may consider publishing source-code documentation for the project. In cases where you are trying to read source code written by others, it will also be helpful if you can get a bird-eye view of the otherwise cryptic source code.

In Linux, doxygen is the de facto standard tool for automatically generating cross-reference documentation from annotated source code. It supports major programming languages including C/C++, Objective-C, C#, PHP, Java and Python. There are more than 350 open-source projects (e.g., Drupal, Gaim, GNU C++ library, KDE) that rely on doxygen for automatic documentation of their source code.

Install Doxygen on Linux

For Ubuntu, Debian or Linux Mint:

To install doxygen on Ubuntu, Linux Mint or Debian:

For CentOS, Fedora or RHEL:

To install doxygen on CentOS, Fedora or RHEL:

Generate Documentation from Source code with doxygen

To generate documentation of source code, proceed as follows.

First, generate a project-specific doxygen configuration file:

The above command will generate a template configuration file for a particular project, which you can further customize as described below.

Among others, you can edit the following options in the configuration file.

Now go ahead and run doxygen with the configuration file.

To browse the HTML-formatted documentation, you can use any web browser to open the HTML index file.

doxygen Documentation Screenshots

This shows a list of header files that are automatically categorized by topics.

ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π€ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux

This shows a list of classes, structs, unions and interfaces with descriptions.

ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π€ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux

This shows a source code browser listing all source files recursively in sub-directories.

ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π€ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux

If you click on a particular source file, you will see a page which shows dependency graph for the file, as well as documentation for all defined functions.

ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π€ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux

This shows a detailed view of function/macro definitions. Below the figure is shown the actual source code snippet that corresponds to this documented portion.

ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π€ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux

ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π€ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal (Credit Card) or Bitcoin ( 1M161JGAkz3oaHNvTiPFjNYkeABox8rb4g ).

Π˜ΡΡ‚ΠΎΡ‡Π½ΠΈΠΊ

Step 0: Check if doxygen supports your programming language

First, assure that your programming language has a reasonable chance of being recognized by doxygen. These languages are supported by default: C, C++, Lex, C#, Objective-C, IDL, Java, VHDL, PHP, Python, Fortran and D. It is possible to configure certain file type extensions to use certain parsers: see the Configuration/ExtensionMappings for details. Also, completely different languages can be supported by using preprocessor programs: see the Helpers page for details.

Step 1: Creating a configuration file

Doxygen uses a configuration file to determine all of its settings. Each project should get its own configuration file. A project can consist of a single source file, but can also be an entire source tree that is recursively scanned.

The configuration file has a format that is similar to that of a (simple) Makefile. It consists of a number of assignments (tags) of the form:

You can probably leave the values of most tags in a generated template configuration file to their default value. See section Configuration for more details about the configuration file.

If you do not wish to edit the configuration file with a text editor, you should have a look at doxywizard, which is a GUI front-end that can create, read and write doxygen configuration files, and allows setting configuration options by entering them via dialogs.

For a small project consisting of a few C and/or C++ source and header files, you can leave INPUT tag empty and doxygen will search for sources in the current directory.

Doxygen looks at the file’s extension to determine how to parse a file, using the following table:

ExtensionLanguageExtensionLanguageExtensionLanguage
.doxC / C++.hppC / C++.pyPython
.docC / C++.h++C / C++.pywPython
.cC / C++.mmC / C++.fFortran
.ccC / C++.txtC / C++.forFortran
.cxxC / C++.idlIDL.f90Fortran
.cppC / C++.ddlIDL.f95Fortran
.c++C / C++.odlIDL.f03Fortran
.iiC / C++.javaJava.f08Fortran
.ixxC / C++.csC#.f18Fortran
.ippC / C++.dD.vhdVHDL
.i++C / C++.phpPHP.vhdlVHDL
.inlC / C++.php4PHP.ucfVHDL
.hC / C++.php5PHP.qsfVHDL
.HC / C++.incPHP.lLex
.hhC / C++.phtmlPHP.mdMarkdown
.HHC / C++.mObjective-C.markdownMarkdown
.hxxC / C++.MObjective-C.iceSlice

Please note that the above list might contain more items than that by default set in the FILE_PATTERNS.

Any extension that is not parsed can be set by adding it to FILE_PATTERNS and when the appropriate EXTENSION_MAPPING is set.

Step 2: Running doxygen

To generate the documentation you can now enter:

HTML output

The generated HTML documentation can be viewed by pointing a HTML browser to the index.html file in the html directory. For the best results a browser that supports cascading style sheets (CSS) should be used (I’m using Mozilla Firefox, Google Chrome, Safari, and sometimes IE8, IE9, and Opera to test the generated output).

Some of the features the HTML section (such as GENERATE_TREEVIEW or the search engine) require a browser that supports Dynamic HTML and JavaScript enabled.

LaTeX output

The generated ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π€ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linuxdocumentation must first be compiled by a ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π€ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linuxcompiler (I use a recent teTeX distribution for Linux and MacOSX and MikTex for Windows). To simplify the process of compiling the generated documentation, doxygen writes a Makefile into the latex directory (on the Windows platform also a make.bat batch file is generated).

The contents and targets in the Makefile depend on the setting of USE_PDFLATEX. If it is disabled (set to NO ), then typing make in the latex directory a dvi file called refman.dvi will be generated. This file can then be viewed using xdvi or converted into a PostScript file refman.ps by typing make ps (this requires dvips ).

To put 2 pages on one physical page use make ps_2on1 instead. The resulting PostScript file can be send to a PostScript printer. If you do not have a PostScript printer, you can try to use ghostscript to convert PostScript into something your printer understands.

Conversion to PDF is also possible if you have installed the ghostscript interpreter; just type make pdf (or make pdf_2on1 ).

RTF output

XML output

A file called combine.xslt XSLT script is also generated and can be used to combine all XML files into a single file.

Doxygen also generates two XML schema files index.xsd (for the index file) and compound.xsd (for the compound files). This schema file describes the possible elements, their attributes and how they are structured, i.e. it the describes the grammar of the XML files and can be used for validation or to steer XSLT scripts.

In the addon/doxmlparser directory you can find a parser library for reading the XML output produced by doxygen in an incremental way (see addon/doxmlparser/doxmparser/index.py and addon/doxmlparser/doxmlparser/compound.py for the interface of the library)

Man page output

The generated man pages can be viewed using the man program. You do need to make sure the man directory is in the man path (see the MANPATH environment variable). Note that there are some limitations to the capabilities of the man page format, so some information (like class diagrams, cross references and formulas) will be lost.

DocBook output

Doxygen can also generate output in the DocBook format. How to process the DocBook output is beyond the scope of this manual.

Step 3: Documenting the sources

Although documenting the sources is presented as step 3, in a new project this should of course be step 1. Here I assume you already have some code and you want doxygen to generate a nice document describing the API and maybe the internals and some related design documentation as well.

If the EXTRACT_ALL option is set to NO in the configuration file (the default), then doxygen will only generate documentation for documented entities. So how do you document these? For members, classes and namespaces there are basically two options:

Place a special documentation block in front of the declaration or definition of the member, class or namespace. For file, class and namespace members it is also allowed to place the documentation directly after the member.

See section Special comment blocks to learn more about special documentation blocks.

Place a special documentation block somewhere else (another file or another location) and put a structural command in the documentation block. A structural command links a documentation block to a certain entity that can be documented (e.g. a member, class, namespace or file).

See section Documentation at other places to learn more about structural commands.

The advantage of the first option is that you do not have to repeat the name of the entity.

Files can only be documented using the second option, since there is no way to put a documentation block before a file. Of course, file members (functions, variables, typedefs, defines) do not need an explicit structural command; just putting a special documentation block in front or behind them will work fine.

The text inside a special documentation block is parsed before it is written to the HTML and/or ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π€ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linuxoutput files.

During parsing the following steps take place:

Go to the next section or return to the index.

Π˜ΡΡ‚ΠΎΡ‡Π½ΠΈΠΊ

Как ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux

Π˜Ρ‚Π°ΠΊ, процСсс ΠΏΠΎ шагам:

1. ΠšΠ°Ρ‡Π°Π΅ΠΌ ΠΏΠΎ ссылкС [1], доступны вСрсии для Linux i386, Mac OS X 10.6 (Snow Leopard), Mac OS X 10.4 (Tiger), Windows XP/Vista/7, Π° Ρ‚Π°ΠΊΠΆΠ΅ исходники (Doxygen распространяСтся ΠΏΠΎΠ΄ Π»ΠΈΡ†Π΅Π½Π·ΠΈΠ΅ΠΉ GPL).

2. ЗапускаСм doxygen-1.7.2-setup.exe. ΠžΡ‚Π²Π΅Ρ‡Π°Π΅ΠΌ Π½Π° нСслоТныС Ρ‚Ρ€Π°Π΄ΠΈΡ†ΠΈΠΎΠ½Π½Ρ‹Π΅ вопросы инсталлятора (ΠΌΠΎΠΆΠ½ΠΎ Ρ‚ΡƒΠΏΠΎ ΠΆΠ°Ρ‚ΡŒ Next). ПослС инсталляции появится ΠΏΠ°ΠΏΠΊΠ° c:\Program Files\doxygen\, Π³Π΄Π΅ ΠΈ находится вся систСма Doxygen, докумСнтация ΠΏΠΎ Π½Π΅ΠΉ, ΠΈ ΡƒΡ‚ΠΈΠ»ΠΈΡ‚Ρ‹.

3. ЗапускаСм c:\Program Files\doxygen\bin\doxywizard.exe. Π­Ρ‚ΠΎ ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ°, которая позволяСт ΡƒΠΏΡ€ΠΎΡΡ‚ΠΈΡ‚ΡŒ созданиС ΠΈ использованиС ΠΊΠΎΠ½Ρ„ΠΈΠ³ΡƒΡ€Π°Ρ†ΠΈΠΎΠ½Π½ΠΎΠ³ΠΎ Ρ„Π°ΠΉΠ»Π° для создания Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚Π°Ρ†ΠΈΠΈ (Doxygen GUI frontend).

ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π€ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux

ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π€ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux

5. Π’Π΅ΠΏΠ΅Ρ€ΡŒ ΠΎΡΡ‚Π°Π»ΠΎΡΡŒ ΠΏΠ΅Ρ€Π΅ΠΉΡ‚ΠΈ Π½Π° Π·Π°ΠΊΠ»Π°Π΄ΠΊΡƒ Run ΠΈ Π½Π°ΠΆΠ°Ρ‚ΡŒ Π½Π° ΠΊΠ½ΠΎΠΏΠΊΡƒ Run doxygen:

ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π€ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux

Если Π²ΠΎ врСмя компиляции Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚Π°Ρ†ΠΈΠΈ Π² тСкстах исходников встрСтятся ошибки, Ρ‚ΠΎ ΠΎΠ½ΠΈ Π±ΡƒΠ΄ΡƒΡ‚ Π²Ρ‹Π²Π΅Π΄Π΅Π½Ρ‹ Π² ΠΏΠΎΠ»Π΅ Π²Ρ‹Π²ΠΎΠ΄Π° «Output produced by doxygen». Π’ сообщСниях ΡƒΠΊΠ°Π·Π°Π½Ρ‹ Π½ΠΎΠΌΠ΅Ρ€Π° строк, Π³Π΄Π΅ Π½Π°ΠΉΠ΄Π΅Π½Ρ‹ ошибки. НумСрация строк Π² сообщСниях «tag without matching» ΠΌΠΎΠΆΠ΅Ρ‚ Π½Π΅ ΡΠΎΠ²ΠΏΠ°Π΄Π°Ρ‚ΡŒ со строками, Π³Π΄Π΅ эти ошибки ΠΈΠΌΠ΅ΡŽΡ‚ΡΡ Π½Π° самом Π΄Π΅Π»Π΅.

Запуск Π³Π΅Π½Π΅Ρ€Π°Ρ†ΠΈΠΈ Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚Π°Ρ†ΠΈΠΈ ΠΌΠΎΠΆΠ½ΠΎ Ρ‚Π°ΠΊΠΆΠ΅ провСсти ΠΈΠ· ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ строки Π²Π²ΠΎΠ΄ΠΎΠΌ ΠΊΠΎΠΌΠ°Π½Π΄Ρ‹ (config-file имя Ρ„Π°ΠΉΠ»Π° ΠΊΠΎΠ½Ρ„ΠΈΠ³ΡƒΡ€Π°Ρ†ΠΈΠΈ doxygen):

Π’ ΠΌΠΎΠ΅ΠΌ ΠΏΡ€ΠΈΠΌΠ΅Ρ€Π΅ Π² ΠΏΠ°ΠΏΠΊΠ΅ VirtualSerial\Documentation\html\ появятся Ρ„Π°ΠΉΠ»Ρ‹ Π² Ρ„ΠΎΡ€ΠΌΠ°Ρ‚Π΅ html. ΠΠ°Ρ‡ΠΈΠ½Π°Ρ‚ΡŒ просмотр Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚Π°Ρ†ΠΈΠΈ Π½ΡƒΠΆΠ½ΠΎ с Ρ„Π°ΠΉΠ»Π° VirtualSerial\Documentation\html\index.html.

ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π€ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux

Если ΠΊΠΎΠ½Ρ„ΠΈΠ³ΡƒΡ€Π°Ρ†ΠΈΠΎΠ½Π½ΠΎΠ³ΠΎ Ρ„Π°ΠΉΠ»Π° Π½Π΅Ρ‚, Ρ‚ΠΎ ΠΌΠΎΠΆΠ½ΠΎ Π²Ρ€ΡƒΡ‡Π½ΡƒΡŽ ΡΠ³Π΅Π½Π΅Ρ€ΠΈΡ‚ΡŒ ΠΊΠΎΠ½Ρ„ΠΈΠ³ΡƒΡ€Π°Ρ†ΠΈΡŽ. НуТно Π²Ρ‹ΠΏΠΎΠ»Π½ΠΈΡ‚ΡŒ, ΠΊΠ°ΠΊ ΠΌΠΈΠ½ΠΈΠΌΡƒΠΌ, ΡΠ»Π΅Π΄ΡƒΡŽΡ‰ΠΈΠ΅ шаги (для ΠΏΡ€ΠΈΠΌΠ΅Ρ€Π° VirtualSerial):

Π—Π°ΠΊΠ»Π°Π΄ΠΊΠ° Run:
— Π½Π°ΠΆΠΈΠΌΠ°Π΅ΠΌ ΠΊΠ½ΠΎΠΏΠΊΡƒ Run Doxugen. Π’ Ρ€Π΅Π·ΡƒΠ»ΡŒΡ‚Π°Ρ‚Π΅ ΠΏΠΎΠ»ΡƒΡ‡ΠΈΠΌ Ρ„Π°ΠΉΠ» СдинствСнный Ρ„Π°ΠΉΠ» VirtualSerial\Documentation\rtf\refman.rtf.

[ΠŸΡ€ΠΎΠ±Π»Π΅ΠΌΠ° ΠΏΡ€Π°Π²ΠΈΠ»ΡŒΠ½ΠΎΠΉ ΠΎΠ±Ρ€Π°Π±ΠΎΡ‚ΠΊΠΈ ΠΊΠΎΠ΄ΠΈΡ€ΠΎΠ²ΠΊΠΈ русского языка]

# Ρ€Π°Π½ΡŒΡˆΠ΅ Ρ‚ΡƒΡ‚ Π±Ρ‹Π»ΠΎ ΡƒΠΊΠ°Π·Π°Π½ΠΎ INPUT_ENCODING = UTF-8
INPUT_ENCODING = windows-1251

ΠšΡ€ΠΎΠΌΠ΅ Ρ‚ΠΎΠ³ΠΎ, Ссли Π½ΡƒΠΆΠ½ΠΎ ΠΏΡ€Π°Π²ΠΈΠ»ΡŒΠ½ΠΎ Ρ€Π°ΡΠΏΠΎΠ·Π½Π°Ρ‚ΡŒ русский тСкст, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹ΠΉ Π΅ΡΡ‚ΡŒ Π² Ρ„Π°ΠΉΠ»Π΅ Doxygen.conf (Π½Π°ΠΏΡ€ΠΈΠΌΠ΅Ρ€, это ΠΌΠΎΠΆΠ΅Ρ‚ Π±Ρ‹Ρ‚ΡŒ тСкст ΠΈΠΌΠ΅Π½ΠΈ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π° PROJECT_NAME ΠΈ Π΄Ρ€ΡƒΠ³ΠΈΠ΅ строки), Ρ‚ΠΎ Π½Π΅ΠΎΠ±Ρ…ΠΎΠ΄ΠΈΠΌΠΎ ΠΎΡ‚Ρ€Π΅Π΄Π°ΠΊΡ‚ΠΈΡ€ΠΎΠ²Π°Ρ‚ΡŒ ΠΏΠ΅Ρ€Π΅ΠΌΠ΅Π½Π½ΡƒΡŽ ΠΊΠΎΠ½Ρ„ΠΈΠ³Π° DOXYFILE_ENCODING (ΡƒΠΊΠ°Π·Π°Ρ‚ΡŒ ΠΊΠΎΠ΄ΠΈΡ€ΠΎΠ²ΠΊΡƒ windows-1251):

# Ρ€Π°Π½ΡŒΡˆΠ΅ Ρ‚ΡƒΡ‚ Π±Ρ‹Π»ΠΎ ΡƒΠΊΠ°Π·Π°Π½ΠΎ DOXYFILE_ENCODING = UTF-8
DOXYFILE_ENCODING = windows-1251

Π’ΠΎΡ‚ Ρ‚Π°ΠΊ ΠΌΠΎΠΆΠ½ΠΎ ΠΈΡΠΏΡ€Π°Π²ΠΈΡ‚ΡŒ ΠΊΠΎΠ΄ΠΈΡ€ΠΎΠ²ΠΊΡƒ Ρ‡Π΅Ρ€Π΅Π· интСрфСйс GUI:

ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π‘ΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ ΠΊΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΡƒ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. ΠšΠ°Ρ€Ρ‚ΠΈΠ½ΠΊΠ° ΠΏΡ€ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux. Π€ΠΎΡ‚ΠΎ ΠΊΠ°ΠΊ ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ doxygen Π½Π° linux

ПослС Ρ‚Π°ΠΊΠΎΠ³ΠΎ исправлСния html Π±ΡƒΠ΄Π΅Ρ‚ ΠΊΠΎΡ€Ρ€Π΅ΠΊΡ‚Π½ΠΎ Π³Π΅Π½Π΅Ρ€ΠΈΡ€ΠΎΠ²Π°Ρ‚ΡŒΡΡ, ΠΈ ΠΏΡ€Π°Π²ΠΈΠ»ΡŒΠ½ΠΎ ΠΎΡ‚ΠΎΠ±Ρ€Π°ΠΆΠ°Ρ‚ΡŒΡΡ всСми Π±Ρ€Π°ΡƒΠ·Π΅Ρ€Π°ΠΌΠΈ, русский тСкст Π±ΡƒΠ΄Π΅Ρ‚ Π±Π΅Π· кракозябр.

[Π­ΠΊΡ€Π°Π½ΠΈΡ€ΠΎΠ²Π°Π½ΠΈΠ΅ ΡΠΏΠ΅Ρ†ΠΈΠ°Π»ΡŒΠ½Ρ‹Ρ… символов doxygen]

Для устранСния ΠΏΡ€Π΅Π΄ΡƒΠΏΡ€Π΅ΠΆΠ΄Π΅Π½ΠΈΠΉ Ρ‚ΠΈΠΏΠ° «ΠΈΠΌΡ_Ρ„Π°ΠΉΠ»Π°:Π½ΠΎΠΌΠ΅Ρ€_строки: warning: explicit link request to ‘define’ could not be resolved» Π½ΡƒΠΆΠ½ΠΎ ΠΏΡ€ΠΈΠΌΠ΅Π½ΡΡ‚ΡŒ для экранирования спСцсимволов ΠΎΠ±Ρ€Π°Ρ‚Π½Ρ‹ΠΉ слСш ‘\’ (backslash). НапримСр, Ρ‚Π°ΠΊ Π½ΡƒΠΆΠ½ΠΎ ΡΠΊΡ€Π°Π½ΠΈΡ€ΠΎΠ²Π°Ρ‚ΡŒ символ # вмСстС с ΠΊΠ»ΡŽΡ‡Π΅Π²Ρ‹ΠΌ словом define:

Ρ‚ΡƒΡ‚ тСкст \#define Ρ‚ΡƒΡ‚ дальшС тСкст

Π­Ρ‚ΠΎ устранит прСдупрСТдСния Ρ‚ΠΈΠΏΠ° request to ‘. ‘ could not be resolved.

Π˜ΡΡ‚ΠΎΡ‡Π½ΠΈΠΊ

Π”ΠΎΠ±Π°Π²ΠΈΡ‚ΡŒ ΠΊΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠΉ

Π’Π°Ρˆ адрСс email Π½Π΅ Π±ΡƒΠ΄Π΅Ρ‚ ΠΎΠΏΡƒΠ±Π»ΠΈΠΊΠΎΠ²Π°Π½. ΠžΠ±ΡΠ·Π°Ρ‚Π΅Π»ΡŒΠ½Ρ‹Π΅ поля ΠΏΠΎΠΌΠ΅Ρ‡Π΅Π½Ρ‹ *