android vlc compile error fix

1. reproduce the error.

1.1 compile android vlc first time successfully

sh compile.sh release

1.2 recompile android vlc second time

sh compile.sh release

1.3 error arise in compiling android vlc second time

The following error will produce.

/opt/android/android-ndk-r9c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: .././vlc/contrib/arm-linux-androideabi/lib/libpng.a(pngrutil.o): in function png_inflate_claim:pngrutil.c:405: error: undefined reference to 'inflateReset2'
collect2: ld returned 1 exit status
make[1]: *** [obj/local/armeabi-v7a/libvlcjni.so] Error 1
make[1]: Leaving directory `/home/frank/workspace/vlc_android_decrypt/vlc-android'
make: *** [vlc-android/obj/local/armeabi-v7a/libvlcjni.so] Error 2
rm android-libs/libmedia.c android-libs/libutils.c android-libs/libstagefright.c android-libs/libbinder.c


2. fix the bug

modify vlc-android/jni/Android.mk, the red part is added for fixing the bug.


LOCAL_LDLIBS := -L$(VLC_CONTRIB)/lib \
        $(VLC_MODULES) \
        $(VLC_BUILD_DIR)/lib/.libs/libvlc.a \
        $(VLC_BUILD_DIR)/src/.libs/libvlccore.a \
        $(VLC_BUILD_DIR)/compat/.libs/libcompat.a \
        /home/frank/workspace/vlc_android3/vlc/contrib/arm-linux-androideabi/lib/libz.a \   or

        $(VLC_BUILD_DIR)/contrib/arm-linux-androideabi/lib/libz.a \
        -ldl -lz -lm -llog \
        -ldvbpsi -lebml -lmatroska -ltag \
        -logg -lFLAC -ltheora -lvorbis \
        -lmpeg2 -la52 \
        -lavformat -lavcodec -lswscale -lavutil -lpostproc -lgsm -lopenjpeg \
        -lliveMedia -lUsageEnvironment -lBasicUsageEnvironment -lgroupsock \
        -lspeex -lspeexdsp \
        -lxml2 -lpng -lgnutls -lgcrypt -lgpg-error \
        -lnettle -lhogweed -lgmp \
        -lfreetype -liconv -lass -lfribidi -lopus \
        -lEGL -lGLESv2 -ljpeg \
        $(CPP_STATIC)



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值