You downloaded the wrong toolchain.
arm-linux-gnueabi-g++
is built using arm-none-eabi
, which is used for bare metal programs. This does not contain libc i.e the standard libraries (glibc or eglibc) are not present in this toolchain.
So, you need to download the arm-none-linux-gnueabi
toolchain (i.e arm-2013.05-24-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
, not arm-2013.11-24-arm-none-eabi-i686-pc-linux-gnu.tar.bz2
).
To verify the above, type:
cd /home/kang/Utils/arm-2013.05/arm-none-eabi
Here you will find only bin include lib share
, and no libc
directory.
Download arm-2013.05-24-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
; here you'll find a folder arm-2013.05/arm-none-linux-gnueabi/libc
.
You can also verify by writing:
arm-linux-eabi-g++ -print-sysroot and
arm-none-linux-gnueabi-g++ -print-sysroot
Also refer to this previous question: how to work with external libraries when cross compiling?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…