Windown下编译Android ffmpeg

Cygwin安装参考上一篇

configure文件修改两处

SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)'
LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'
SLIB_INSTALL_NAME='$(SLIBNAME_WITH_VERSION)'
SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)'

替换成

SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
LIB_INSTALL_EXTRA_CMD='$$(RANLIB)"$(LIBDIR)/$(LIBNAME)"'
SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)'
SLIB_INSTALL_LINKS='$(SLIBNAME)'

: ${TMPDIR:=$TEMPDIR}
: ${TMPDIR:=$TMP}
: ${TMPDIR:=/tmp}

替换成

: ${TMPDIR:=E:/target/tmp}

sh文件中把路径替换成window的绝对路径

export ANDROID_NDK_HOME=F:/work/ASSDK/android-ndk-r11c
export PATH=$ANDROID_NDK_HOME:$PATH
export TMPDIR=E:/target/tmp

SYSROOT=$ANDROID_NDK_HOME/platforms/android-14/arch-arm
TOOLCHAIN=$ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64

最终mk文件构建生成so,直接用ndk-bulid,在./libs/里面
ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=./Android.mk NDK_APPLICATION_MK=./Application.mk

你可能感兴趣的:(Windown下编译Android ffmpeg)