1、
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt] Error 1
缺少lib32z1-dev,安装即可:apt-get install lib32z1-dev
2、
<built-in>:0:0: note: this is the location of the previous definition cc1plus: all warnings being treated as errors
make: *** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main.o] Error 1
后来发现了,原来是Ubuntu11.10里的gcc和g++版本太高了,于是执行下面的操作:
sudo apt-get install gcc-4.4
sudo apt-get install g++-4.4
sudo rm -rf /usr/bin/gcc /usr/bin/g++
sudo ln -s /usr/bin/gcc-4.4 /usr/bin/gcc
sudo ln -s /usr/bin/g++-4.4 /usr/bin/g++
上面两句ln命令可不执行,可以执行如下命令:(每次打开终端时都需输入,或放至脚本中)
export CC=gcc-4.4
export CXX=g++-4.4
3、g++ selected multilib '32' not installed
继续奋战吧,安装相应的工具吧:sudo apt-get install g++-4.4-multilib