Skip to content

Analysis C/C++ include, check circle include, export graphviz dot file

License

Notifications You must be signed in to change notification settings

LiuYinCarl/headerFileAnalysis

Repository files navigation

headerFileAnalysis

C/C++ include files analysis

Usage

Linux 下使用

# Compiler
bash build.sh
# 或者使用 make
make

# Run (use Lua as a Example)
./headerFileAnalysis path/to/your/project/

How to generate .dot file to a picture

  1. install graphviz. if you use Ubuntu OS, run
sudo apt-get install graphviz

if you use Windows. download it from graphviz website don't forget add graphviz to your system path.

  1. install VScode plugin Graphviz Preview(author: EFanZh)

  2. in VSCode, open a dot file, then you can find a button on upper left of the window. click it, you can see a picture like

use command line to generate output file

# pdf format
$ dot -Tpdf -o output.pdf input.dot
# svg format
$ dot -Tsvg -o output.svg input.dot

mor output format see Graphviz Output Formats Document

lua_include_graph.svg

ocaml_include_graph.svg

cpython_include_graph.svg