https://github.com/pvigier/dependency-graph
A script to draw the dependency of C++ classes.
https://github.com/pvigier/dependency-graph
circular-dependencies graphviz
Last synced: about 2 months ago
JSON representation
A script to draw the dependency of C++ classes.
- Host: GitHub
- URL: https://github.com/pvigier/dependency-graph
- Owner: pvigier
- License: mit
- Created: 2018-02-09T12:44:23.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-05-01T11:29:03.000Z (over 1 year ago)
- Last Synced: 2025-06-07T05:39:50.475Z (4 months ago)
- Topics: circular-dependencies, graphviz
- Language: Python
- Homepage: https://pvigier.github.io/2018/02/09/dependency-graph.html
- Size: 574 KB
- Stars: 176
- Watchers: 2
- Forks: 39
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dependency-graph
A python script to show the "include" dependency of C++ classes.
It is useful to check the presence of circular dependencies.
## Installation
The script depends on [Graphviz](https://www.graphviz.org/) to draw the graph.
On Ubuntu, you can install the dependencies with these two commands:
```
sudo apt install graphviz
pip3 install -r requirements.txt
```## Manual
```
usage: dependency_graph.py [-h] [-f {bmp,gif,jpg,png,pdf,svg}] [-v] [-c]
folder outputpositional arguments:
folder Path to the folder to scan
output Path of the output file without the extensionoptional arguments:
-h, --help show this help message and exit
-f {bmp,gif,jpg,png,pdf,svg}, --format {bmp,gif,jpg,png,pdf,svg}
Format of the output
-v, --view View the graph
-c, --cluster Create a cluster for each subfolder
```## Examples
Example of a graph produced by the script:

Graph produced for the same project with clusters (`-c`):
