Display-include-hierachy-for-a-C-file

In fact, your GCC compiler can output a dependency list, too - but it is not a .dot file that can be feed to GraphViz. The options are -H, -M (a tree), and -MM (same as -M, but only user headers are counted).

https://github.com/Leedehai/C-include-2-dot

Example:

gcc main.cpp -H -I/path/to/include/directory
posted @ 2024-09-28 13:35  寻找繁星  阅读(0)  评论(0编辑  收藏  举报