歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux編程 >> Linux編程 >> 用NDK編譯ACE在Android上運行

用NDK編譯ACE在Android上運行

日期:2017/3/1 11:08:40   编辑:Linux編程

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版本的設備上測試可以正常運行

Copyright © Linux教程網 All Rights Reserved