GCC -- version
The GCC version of ubuntu 11.10 is 4.6.1. The version is too high. If you fail to compile Android, you need to change the GCC version to 4.4.3.
Through gcc
-V command can be found in the GCC Library/usr/lib/GCC/i686-linux-gnu directory, the directory has the current system to support all types of GCC library. Install gcc
4.4 Before this directory is not 4.4 directory, after the installation of GCC 4.4, the directory will be more than 4.4 This directory, and the 4.4 directory contains various types of response library files.
The best way to install GCC 4.4 in Ubuntu 32bit system is to only use the following two number orders, no other number orders are required, or the compilation may fail.
Sudo apt-Get install gcc-4.4
Sudo apt-Get install g ++-4.4
After installation, go to the/usr/bin directory.
$ LS-l GCC *
Lrwxrwxrwx 1 Root 7 2011-10-29 gcc-> gcc-4.6
-Rwxr-XR-x 1 Root 224544 gcc-4.4
-Rwxr-XR-x 1 Root 302104 gcc-4.6
The invention of GCC link to the gcc-4.6, need to link it to the gcc-4.4:
Sudo mv gcc. Bak
Sudo ln-s gcc-4.4 gcc
Likewise
Ls-l g ++ *
Lrwxrwxrwx 1 Root 7g ++-> G ++-4.6
-Rwxr-XR-x 1 Root 228640g ++-4.4
-Rwxr-XR-x 1 Root 306200g ++-4.6
You need to change the G ++ link to G ++-4.4:
/Usr/bin ¥ sudo MV g ++. Bak
/Usr/bin ¥ sudo ln-s g ++-4.4g ++
Check the GCC and G ++ versions:
Gcc-V
G ++-V
GCC version 4.4.6 is displayed, indicating that GCC 4.4 is successfully installed.