android vlc compile error fix
2015-10-19 17:21
543 查看
http://blog.csdn.net/fanbird2008/article/details/21470811
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. 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)
相关文章推荐
- Android设备root及xposed&Privacy的安装
- Android 滚动条属性
- Android编译过程详解(一)
- Android 简单图片浏览器 ImageView
- 模拟Android多点触控
- android 控制POS机图文打印(二)
- 修改Android OS操作系统的代码,自动请求AGPS
- android js交互备忘,webview配置
- android java epson串口打印机
- android 仿淘宝京东等viewpager自动滚动
- android studio 启动卡死,创建项目卡死
- Android 框架层录音音量调节功能引入
- Android内存优化:Handler
- 关于android中activity的四种启动模式
- Android笔记:Android应用的基本组件
- android:intent flags
- Android Intent action 的作用
- android 的Activity和Service之间的通信
- [原创]Android init.rc文件解析过程详解(二)
- Android LayoutInflater原理分析,了解View(一)