NDK r21下编译FDK-AAC

下载NDK

从NDK官网下载NDK,并上传到服务器任意目录,本文上传到/home/syq目录中。
当前最新稳定版为r21b。

从NDK导出工具链

cd /home/syq/android-ndk-r21b       #NDK的安装目录
./make-standalone-toolchain.sh --platform=android-24 --install-dir=/home/syq/android-toolchain --force  #生成工具链

编译脚本

注意:要仔细研究“configure --help”的输出

#!/bin/bash

export NDK_TOOLCHAIN_DIR=/home/syq/android-toolchain/

export INSTALL_DIR=/home/syq/install/fdk-aac-arm

export CONFIGURE_FLAGS="--prefix=$INSTALL_DIR --enable-example --with-aix-soname=-arm"
export PATH=$PATH:$NDK_TOOLCHAIN_DIR/bin/
./autogen.sh
./configure $CONFIGURE_FLAGS  --host=arm-linux-androideabi  CC=arm-linux-androideabi-gcc
make -j8
make install

编译过程中的错误:

  CXX      libSBRdec/src/psbitdec.lo
libSBRdec/src/lpp_tran.cpp:342:5: error: use of undeclared identifier 'android_errorWriteLog'
    android_errorWriteLog(0x534e4554, "112160868");
    ^
libSBRdec/src/lpp_tran.cpp:940:5: error: use of undeclared identifier 'android_errorWriteLog'
    android_errorWriteLog(0x534e4554, "112160868");
    ^
2 errors generated.
Makefile:1575: recipe for target 'libSBRdec/src/lpp_tran.lo' failed
make: *** [libSBRdec/src/lpp_tran.lo] Error 1
make: *** Waiting for unfinished jobs....

把错误行的代码注释掉,即可。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值