To generate the output of C code using Doxygen, one has to generate a Doxygen Configuration file and customize some options there according to one's requirement. The steps that I generally follow are listed below:
To generate pdf we need the latex/ folder. How to generate pdf? Use pdflatex tool.
- doxygen -g [config-file-name-optional]: if the file name is given then configuration file is named that else it is Doxyfile.
- Edit Doxyfile. I prefer it with vim, so
vim Doxyfile
Then set following options:
- OPTIMISE_OUTPUT_FOR_C = YES
- FILE_PATTERNS = *.c *.h
- RECURSIVE = YES
- EXTRACT_ALL = YES
- EXTRACT_STATIC = YES
- SHOW_INCLUDE_FILES = NO Save and exit the vim editor with the key combination [esc]:wq
- Now just run doxygen by issuing command
doxygen [config-file-name-optional]. In my case I write just doxygen - Two folders are created html/ and latex/.
To generate pdf we need the latex/ folder. How to generate pdf? Use pdflatex tool.