我正在尝试用icpc在64位机器上编译一个程序。不幸的是,我收到了catastrophic error: cannot open source file "bits/c++config.h"
的错误消息。我采纳了here的一些建议,但没有成功。此外,我也没有忘记事先运行source /opt/intel/bin/compilervars.sh intel64
,而且我使用的是Ubuntu13.10,以防这很重要。
发布于 2013-10-29 22:21:16
首先,找到丢失的文件:
find /usr -name c++config.h
(大多数情况下,标头位于/usr中。)然后,将它的顶级目录添加到编译命令的包含路径中,这样编译器就会使用-I选项找到"bits/c++config.h“。类似的问题已经在SO,BTW:Missing include "bits/c++config.h" when cross compiling 64 bit program on 32 bit in Ubuntu上被问到了。
发布于 2014-04-22 20:32:37
由于某些原因,icpc编译器无法解析以下目录。您可以设置以下变量;将4.8替换为您的g++版本
export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/include/x86_64-linux-gnu/c++/4.8
https://stackoverflow.com/questions/19660431
复制相似问题