Generating call graphs with Doxygen

Obviously you should first download and install Doxygen

Next, you should download and install Graphviz which will install the dot tool

in a nutshell, you create the documentation by running:

doxygen my_conf_file

Where my_conf_file contains all the required parameters for the generated documentation. If you use the doxygen wizard from the UI, a configuration file will be generated with some default parameters, however you need to change the following parameters in the generated configuration file if you want caller and/or called function graphs to be generated:

HAVE_DOT               = YES
EXTRACT_ALL            = YES
CALL_GRAPH             = YES
CALLER_GRAPH           = YES

Note that if you use the above parameters on a non-trivial code base then the documentation generation might take a long time. Read the doxygen documentation to better understand the implications.

Leave a Reply

Your email address will not be published. Required fields are marked *