Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bits/c++config.h no such file or directory [duplicate]

I'm trying to compile my code including iostream lib on ubuntu 14.04, using qt creator, but when I execute it I got this error message:

/usr/include/c++/4.8/iostream:38: error: bits/c++config.h: No such file or directory #include <bits/c++config.h>

Even if I try to compile it by terminal, I have the same trouble. This is a c code that i got from my friend, not c++, but I still need to include this iostream. I made a huge research and can't find anything useful on internet, just posts talking about 64 or 32 bits OS. I'm new on programming scene, I'm glad for your patience, thanks.

like image 838
paulinhok14 Avatar asked Dec 23 '15 14:12

paulinhok14


1 Answers

It does look like a cross-platform compilation issue. Did you install the multilib packages:

sudo apt install gcc-multilib g++-multilib

If you've installed a version of gcc / g++ that doesn't ship by default you'll want to match the version as well:

sudo apt-get install gcc-4.8-multilib g++-4.8-multilib

Related question.

like image 76
James Hirschorn Avatar answered Nov 11 '22 20:11

James Hirschorn