【问题标题】:Excluding folders from dependencies autogenerated by eclipse?从eclipse自动生成的依赖项中排除文件夹?
【发布时间】:2015-06-08 17:05:48
【问题描述】:

我是 eclipse 新手,搜索了 40 分钟后无法解决这个问题。

我在最新版本的 eclipse 中有一个 c++ 项目。我的项目使用了 boost。

Eclipse 为我生成了一个生成文件,其中包含一堆列出依赖项的 .d 文件。 .d 文件中包含一长串 boost 标头。

当我运行 make 时,它​​会扫描每一个 boost 标头以查看它们是否已更改。这使得构建速度慢得让人难以忍受。

如何防止将 boost 文件夹中的任何内容添加到 .d 文件中?

非常感谢。

【问题讨论】:

    标签: c++ eclipse makefile


    【解决方案1】:

    我通过转到项目 -> 属性 -> C/C++ 构建 -> 设置 -> 交叉 G++ 编译器 -> 杂项解决了这个问题,并在“其他标志”的末尾添加了“-isystem C:/路径/到/提升”。这指示 g++ 编译器将 -IC:/path/to/boost 添加的包含路径视为系统头文件,以便 -MD 依赖项生成标志(由 eclipse 使用)将忽略该目录。见

    https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html#index-isystem-1165

    https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html#index-MMD-1148

    【讨论】:

      猜你喜欢
      • 2016-02-28
      • 2012-11-01
      • 2014-07-03
      • 2011-07-10
      • 2011-11-26
      • 1970-01-01
      • 2014-03-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多