Doxygen can create beautiful figures out of your C++ source code. Even if it not really useful, you can at least look at a nice graph that shows all the complicated dependencies of the objects in your project.

The above image was produced for Stochtreat. Below are the instructions to create this graph using the terminal in Mac OS:

  1. To install doxygen you can use brew install doxygen (of cause only if you have homebrew installed).
  2. For creating the graphs you also need graphviz: brew install graphviz.
  3. You then need to create a config file inside your projects folder: doxygen -g generates a commented default config file with the name “Doxyfile”.
  4. In the now generated file “Doxyfile”, set some or all of the following variables (in principle just search for “dots” and change the related settings):
    PROJECT_NAME           = "something"
    OUTPUT_DIRECTORY       = ./doxydoc/
    BUILTIN_STL_SUPPORT    = YES
    EXTRACT_ALL            = YES
    INPUT                  = ./src ./include
    RECURSIVE              = YES
    HIDE_UNDOC_RELATIONS   = NO
    HAVE_DOT               = YES
    UML_LOOK               = YES
    CALL_GRAPH             = YES
    CALLER_GRAPH           = YES
  1. Finally, start doxygen Doxyfile and you will find your beautiful figures in the documentation inside the ./doxydoc/ folder.