Adding this answer partially because it fixed my problem of the same issue and so I can bookmark this question myself.
I was able to fix it by doing the following:
sudo apt-get install gcc-multilib g++-multilib
If you've installed a version of gcc
/ g++
that doesn't ship by default (such as g++-4.8
on lucid) you'll want to match the version as well:
sudo apt-get install gcc-4.8-multilib g++-4.8-multilib
Did you try adding -I/usr/include/c++/4.4/i486-linux-gnu
or -I/usr/include/c++/4.4/i686-linux-gnu
?
While compiling in RHEL 6.2 (x86_64), I installed both 32bit and 64bit libstdc++-dev packages, but I had the "c++config.h no such file or directory" problem.
Resolution:
The directory /usr/include/c++/4.4.6/x86_64-redhat-linux
was missing.
I did the following:
cd /usr/include/c++/4.4.6/
mkdir x86_64-redhat-linux
cd x86_64-redhat-linux
ln -s ../i686-redhat-linux 32
I'm now able to compile 32bit binaries on a 64bit OS.
Seems to be a typo error in that package of gcc. The solution:
mv /usr/include/c++/4.x/i486-linux-gnu /usr/include/c++/4.x/i686-linux-gnu/64
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With