首页 > 代码库 > 【转】gcc降级到4.4,编译android,Ubuntu12.04
【转】gcc降级到4.4,编译android,Ubuntu12.04
1. 查看gcc版本和g++版本
:/usr/bin$ ls -l gcc*
lrwxrwxrwx 1 root root 7 Aug 30 19:26 gcc -> gcc-4.6
-rwxr-xr-x 1 root root 353216 Apr 16 07:37 gcc-4.6
:/usr/bin$ ls -l g++*
lrwxrwxrwx 1 root root 7 Mar 14 04:05 g++ -> g++-4.6
-rwxr-xr-x 1 root root 357312 Apr 16 07:36 g++-4.6
2. 安装gcc和g++ 4.4版本
sudo apt-get install gcc-4.4 g++-4.4 g++-4.4-multilib
3. 修改gcc链接
sudo mv gcc gcc.bak
sudo ln -s gcc-4.4 gcc
:/usr/bin$ ls -l gcc*
lrwxrwxrwx 1 root root 7 Sep 6 10:43 gcc -> gcc-4.4
-rwxr-xr-x 1 root root 259232 Apr 16 14:20 gcc-4.4
-rwxr-xr-x 1 root root 353216 Apr 16 07:37 gcc-4.6
lrwxrwxrwx 1 root root 7 Aug 30 19:26 gcc.bak -> gcc-4.6
4. 修改g++链接
sudo mv g++ g++.bak
sudo ln -s g++-4.4 g++
:/usr/bin$ ls -l g++*
lrwxrwxrwx 1 root root 7 Sep 6 10:45 g++ -> g++-4.4
-rwxr-xr-x 1 root root 263328 Apr 16 14:18 g++-4.4
-rwxr-xr-x 1 root root 357312 Apr 16 07:36 g++-4.6
lrwxrwxrwx 1 root root 7 Mar 14 04:05 g++.bak -> g++-4.6
5.查看gcc和g++版本号
gcc-v
g++-v
【转】gcc降级到4.4,编译android,Ubuntu12.04