Missing include “bits/c++config.h” when cross compiling 64 bit program on 32 bit in Ubuntu

前端 未结 8 2548
你的背包
你的背包 2020-11-29 15:36

I am running the 32bit version of Ubuntu 10.10 and trying to cross compile to a 64 bit target. Based on my research, I have installed the g++-multilib package.

The p

8条回答
  •  再見小時候
    2020-11-29 16:17

    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.

提交回复
热议问题