查看包含依赖项
有谁知道有一个工具可以分析 C++ 代码库并显示哪些文件包含哪些头文件并突出显示冗余包含的图形表示? 我使用过Understanding C++,但它很昂贵,并且在大型(且封装不良)的代码库上很快变得非常笨拙。
Does anyone know of a tool that will analyse a C++ codebase and display a graphical representation of which files include which header files and highlight redundant includes? I've used Understand C++ but it's expensive and became very unwieldy very quickly on a large (and poorly encapsulated) codebase.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
gcc/g++ 总是有 "-H" 选项...
例如: % g++ -H foo.C
然后:
比如:
或者这对你来说太 linux'y / unix'y 了?
(在windows下,总是有cygwin。)
There's always the "-H" option to gcc/g++...
Eg.: % g++ -H foo.C
Then:
As in:
Or is that too linux'y / unix'y for you?
(Under windows, there's always cygwin.)
试试这个
跟踪 #include 依赖项的工具
这听起来像是一个非常简单的练习你自己的一个。 添加“冗余”包括确定,但可能更具挑战性。 人们必须解析并遵循 ifdef 等。 但对于仅仅制作依赖树来说,这是非常简单的。
try this
Tool to track #include dependencies
It also sounds like a very simple exercise to write one of your own. Adding "redundant" include determination though might be more challenging. One would have to parse and follow ifdefs and the like. But for just making a tree of dependencies it is pretty straightforward.