c++ - 如何使 Visual Studio (C++) 显示 "included by"-链?

标签 c++ visual-studio

<分区>

当来自 .cpp 文件的一系列包含文件包含的头文件中存在构建错误时,如何让 visual studio 显示整个包含文件链?

例如,

fatal error C1083: Cannot open include file: 'abc.h': No such file or directory

我希望它也打印类似的东西

included from 'xyz.h', included from 'efg.h', included from 'main.cpp'

最佳答案

您可以使用/showIncludes 选项,它可以在C/C++ -> Advanced 部分找到。不过,它会转储完整的包含树。

关于c++ - 如何使 Visual Studio (C++) 显示 "included by"-链?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53186113/

相关文章:

mysql - 如何从 VB.NET 和 MySql 8 中的给定记录读取特定列?

c++ - memcpy 导致程序因初始化目标而崩溃

c++ - 如何将预定的一组模板实例化添加到函数模板中

c++ - 获取 make 项目编译和包含的文件列表

c++ - (C++) 带有 SPI_SetMouse 的 SystemParametersInfo 似乎不会改变光标速度

visual-studio - 代码分析 - CA1704 : Correct the spelling of 'Ps'

c++ - 在 Visual Studio 2008 中调试时如何通过管道输出?

c++ - 为什么 static_assert 在带有 const 参数的成员函数中不起作用?

vb.net - 如何在 Visual Studio 中为 Visual Basic Web 部署项目禁用警告

visual-studio - 将 WinSCP 源文件导入 Microsoft Visual Studio 2008?