ubuntu11.10 make android 4.0.3

编译错误"/usr/bin/ld: cannot find -lz"

编译的时候出现"/usr/bin/ld: cannot find -lz"错误,需要安装zlib-dev这个包,在线安装命令为:sudo apt-get install zlib1g-dev。

ubuntu 安装ncurses

ncurses是字符终端下屏幕控制的基本库。可能很多新开发的程序都不使用了,不过如果要编译一些老程序,还经常遇得到。
执行命令

 sudo apt-get install libncurses5-dev

Building Android: error: “_FORTIFY_SOURCE” redefined [-Werror]

If you are building an old version of android probably you’ll have this error

host C++: obbtool <= frameworks/base/tools/obbtool/Main.cpp
:0:0: error: “_FORTIFY_SOURCE” redefined [-Werror]
:0:0: note: this is the location of the previous definition
cc1plus: all warnings being treated as errors

To fix this, edit build/core/combo/HOST_linux-x86.mk and replace:

HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0

with

HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0

And that’s it.



你可能感兴趣的:(Android)