Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot open source file "bits/c++config.h" error with icpc

I am trying to compile a program on a 64-bit machine with icpc. Unfortunately, I get an error message of catastrophic error: cannot open source file "bits/c++config.h". I have adopded some advice from here but with no success. Also, I do not forget to run source /opt/intel/bin/compilervars.sh intel64 before hand and I'm on Ubuntu 13.10 in case this is important.

like image 563
Eugene B Avatar asked Oct 29 '13 14:10

Eugene B


1 Answers

First, find the missing file:

find /usr -name c++config.h

(Headers are in /usr, most of the time.) Then, add its top dir to the include path of your compilation command, so the compiler will find "bits/c++config.h", using the -I option. A similar question was already asked on SO, BTW: Missing include "bits/c++config.h" when cross compiling 64 bit program on 32 bit in Ubuntu.

like image 136
Sven Avatar answered Oct 06 '22 15:10

Sven