2

I'm trying to compile simple c++ file and keep getting this problem

/usr/include/c++/8/iostream:38:10: fatal error: bits/c++config.h: No such file or directory

I also found c++config.h file here: /usr/include/c++/8/i686-redhat-linux/bits/c++config.h

I've found a solution for Ubuntu with installing gcc-multilib but this does not work for fedora (Error: Unable to find a match). I probably have g++ installed with gcc-c++.

bruno
  • 32,421
  • 7
  • 25
  • 37
Maxim_CH
  • 21
  • 4

1 Answers1

3

/usr/include/c++/8/iostream:38:10: fatal error: bits/c++config.h: No such file or directory

I also found c++config.h file here: /usr/include/c++/8/i686-redhat-linux/bits/c++config.h

That recalls the problem on https://stackoverflow.com/a/9617178/2458991

create the right symbolic link like doing (not sure f the name x86_64-redhat-linux) :

cd /usr/include/c++/8
ln -s i686-redhat-linux x86_64-redhat-linux

or

cd /usr/include/c++/8
ln -s i686-redhat-linux/bits

However I hope that will not give wrong definitions with a mix 32b / 64b, do some tests after ...

Community
  • 1
  • 1
bruno
  • 32,421
  • 7
  • 25
  • 37
  • For people who can't doesn't have `/usr/include/c++/8` folder , it might be `/usr/include/c++/9` on your system. You can find out the number by running `gcc -v`, look at the first number in the version line `gcc version 9.2.1 20190827 (Red Hat 9.2.1-1) (GCC) ` – johnlinvc Dec 20 '19 at 03:26