2

There is a library or something to create a graph of header dependencies of the sourcecode of a project.

For example, you have a class (class1.hpp and class1.cpp, cmethods.h and cmethods.c and the main program in mainFile.cpp).

Obtain a graph like this.

enter image description here

Thanks in advance.

Jorge Vega Sánchez
  • 7,430
  • 14
  • 55
  • 77

1 Answers1

3

I'm not sure whether include file heirachies are supported but you might want to check Doxygen it does a source code analysis and is able to draw diagramms.

See also this introduction Learning doxygen for source code documentation.

If there are no conditional includes (#ifdef) you could also easily parse the source files by your self and generate an input file for graphviz.

stacker
  • 68,052
  • 28
  • 140
  • 210