1
我已经成功地编译的ffmpeg作为我与Android平台的19项目的静态库,Application.xml中规定如下编译ffmpeg的时候:如何保持兼容性与Android NDK
APP_PLATFORM := android-19
测试我的项目在设备上(4.4),它运行良好。但它会在4.0设备上崩溃。
所以我想改变APP_PLATFORM低版本,如:
APP_PLATFORM := android-17
但是IDE出来这样的错误。
libavcodec/ffv1enc.c:631: error: undefined reference to 'log2'
而且当我把它改成一个更加低版本:
APP_PLATFORM := android-8
更多错误发生:
libavcodec/ffv1enc.c:631: error: undefined reference to 'log2'
libavutil/mem.c:94: error: undefined reference to 'posix_memalign'
我知道的log 2基准是不确定的,因为失踪的libm,但作为就我所见,Android会在建立时自动链接到libm。 http://mobilepearls.com/labs/native-android-api/ndk/docs/STABLE-APIS.html
因此,如何在编译ffmpeg时保持兼容性,以便在较低版本的设备上良好运行我的项目。