Display include hierachy for a C/C++ file

阅读量: searchstar 2023-05-12 12:50:37
Categories: Tags:

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).



gcc main.cpp -H -I/path/to/include/directory