小编sma*_*rte的帖子

如何快速调试C++包含文件问题

我们经常会遇到这样的问题,如下所示:

1>Compiling...
1>a.cpp
1>c:\apps\b.h(22) : fatal error C1083: Cannot open include file: 'boost/shared_ptr.hpp': No such file or directory
Run Code Online (Sandbox Code Playgroud)

有时它可能会很乏味,因为在一个大项目中有很多包含文件,甚至嵌套包含文件。

跟踪/哪个包含文件是包含有问题的包含文件的罪魁祸首(父级)的最佳方法是什么?

问题是它有嵌套的包含,所以需要花费一些努力才能知道哪个文件实际包含 bh

c++ debugging compiler-errors

5
推荐指数
1
解决办法
4700
查看次数

标签 统计

c++ ×1

compiler-errors ×1

debugging ×1