【问题标题】:Cannot open source file "bits/c++config.h" error with icpcicpc 无法打开源文件“bits/c++config.h”错误
【发布时间】:2013-11-08 17:43:26
【问题描述】:

我正在尝试使用 icpc 在 64 位机器上编译程序。不幸的是,我收到catastrophic error: cannot open source file "bits/c++config.h" 的错误消息。我采纳了here 的一些建议,但没有成功。另外,我不要忘记事先运行source /opt/intel/bin/compilervars.sh intel64,如果这很重要,我使用的是 Ubuntu 13.10。

【问题讨论】:

    标签: c++ ubuntu gcc icc ubuntu-13.10


    【解决方案1】:

    出于某种原因,icpc 编译器不解析以下目录。您可以设置以下变量;用你的 g++ 版本替换 4.8

    export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/include/x86_64-linux-gnu/c++/4.8
    

    【讨论】:

      【解决方案2】:

      首先,找到丢失的文件:

      find /usr -name c++config.h
      

      (头文件在 /usr 中,大部分时间。)然后,将其顶部目录添加到编译命令的包含路径中,这样编译器将找到“bits/c++config .h",使用 -I 选项。一个类似的问题已经被问到了,顺便说一句:Missing include "bits/c++config.h" when cross compiling 64 bit program on 32 bit in Ubuntu

      【讨论】:

      • 非常感谢!我已经看到了您建议的主题,但还没有找到解决方案。无论如何,你的解决方案对我有用!
      猜你喜欢
      • 1970-01-01
      • 2012-07-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-03-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多