android vlc compile error fix

来源:互联网 发布:创建目录java 编辑:程序博客网 时间:2024/05/31 05:29

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)



1 0
原创粉丝点击