Neil Developer

如何 显示 cpp 文件的 include 树形结构

2017-07-18
Neil

在排除一下 cpp 编译错误时, 可能需要搞清楚文件包含关系.
linux:

gcc  -M showtime.c  my.cpp

windows:

cl.exe  /showIncludes  my.cpp

参考:

  1. https://stackoverflow.com/questions/5834778/how-to-tell-where-a-header-file-is-included-from
  2. https://stackoverflow.com/questions/1137966/displaying-the-include-hierarchy-for-a-c-file-in-visual-studio

Comments

Content