用ndk编译ace在android上运行

1.准备工具链

./build/tools/make-standalone-toolchain.sh --toolchain=arm-linux-androideabi-4.4.3 --arch=arm --platform=android-9 --install-dir=../arm_tools


2.Create ace/config.h: #include "ace/config-android.h"


3.Create include/makeinclude/platform_macros.GNU:
include $(ACE_ROOT)/include/makeinclude/platform_android.GNU


4. 修改.bashrc文件,设置环境变量
export PATH=$PATH:/home/bsxy/arm_tools/bin
#export ACE_ROOT=/home/bsxy/ACE_wrappers


5. cd $ACE_ROOT/ace 
make


6. 编译后的结果为静态库,需要自己在开发的 android应用的jni中手动链入.




 
 其他:
 .实验用的 ace版本:ACE-6.0.5.tar.bz2
 .编译环境 ubuntu 11
 .ndk:android-ndk-r6b-linux-x86

 .经试验,使用android8的工具链无法编译ace.

.在2.3版本的设备上测试可以正常运行


参考:http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/ACE-INSTALL.html

你可能感兴趣的:(用ndk编译ace在android上运行)