添加第三方视频库出现的bug

添加播放的第三方库出现的bug

1、添加 ** FFmpeg-iOS-build-script ** 出现的报错信息

I am able to compile ffmpeg library but when integrate static library of ffmpeg its still giving undefined symbol error for various architecture.
I have tried with http://sourceforge.net/projects/ffmpeg-ios/postdownload?source=dlp too but this is giving same error

Undefined symbols for architecture armv7:
"_BZ2_bzDecompressInit", referenced from:
_matroska_decode_buffer in libavformat.a(matroskadec.o)
"_iconv", referenced from:
_avcodec_decode_subtitle2 in libavcodec.a(utils.o)
"_BZ2_bzDecompress", referenced from:
_matroska_decode_buffer in libavformat.a(matroskadec.o)
"_BZ2_bzDecompressEnd", referenced from:
_matroska_decode_buffer in libavformat.a(matroskadec.o)
"_iconv_open", referenced from:
_avcodec_open2 in libavcodec.a(utils.o)
_avcodec_decode_subtitle2 in libavcodec.a(utils.o)
"_iconv_close", referenced from:
_avcodec_open2 in libavcodec.a(utils.o)
_avcodec_decode_subtitle2 in libavcodec.a(utils.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

2、添加 MobileVLCKit.framework出现的报错信息

Undefined symbols for architecture x86_64:
  "_BZ2_bzDecompress", referenced from:
      _ft_bzip2_file_fill_output in MobileVLCKit(ftbzip2.o)
  "_BZ2_bzDecompressEnd", referenced from:
      _ft_bzip2_stream_io in MobileVLCKit(ftbzip2.o)
      _ft_bzip2_stream_close in MobileVLCKit(ftbzip2.o)
  "_BZ2_bzDecompressInit", referenced from:
      _FT_Stream_OpenBzip2 in MobileVLCKit(ftbzip2.o)
      _ft_bzip2_stream_io in MobileVLCKit(ftbzip2.o)
  "_iconv", referenced from:
      _sub_recode in MobileVLCKit(ass.o)
      _vbi_print_page_region in MobileVLCKit(exp-txt.o)
      _print_unicode in MobileVLCKit(exp-txt.o)
      _vlc_iconv in MobileVLCKit(libc.o)
      _vbi_ucs2be in MobileVLCKit(export.o)
      _iconv_ucs2 in MobileVLCKit(conv.o)
      __vbi_iconv_open in MobileVLCKit(conv.o)
      ...
     (maybe you meant: _vbi_fputs_iconv_ucs2, _vbi_strndup_iconv_caption , __vbi_iconv_open , __vbi_iconv_close , _vbi_export_puts_iconv_ucs2 , __vbi_strndup_iconv , _vbi_export_puts_iconv , _vbi_strndup_iconv_ucs2 , __vbi_iconv_ucs2 , _vlc_iconv , _vlc_iconv_close , _vbi_strndup_iconv , _vbi_fputs_iconv , _vlc_iconv_open )
  "_iconv_close", referenced from:
      _sub_recode in MobileVLCKit(ass.o)
      _vbi_print_page_region in MobileVLCKit(exp-txt.o)
      _export in MobileVLCKit(exp-txt.o)
      _vlc_iconv_close in MobileVLCKit(libc.o)
      _vbi_ucs2be in MobileVLCKit(export.o)
      __vbi_iconv_close in MobileVLCKit(conv.o)
      __vbi_iconv_open in MobileVLCKit(conv.o)
      ...
     (maybe you meant: __vbi_iconv_close, _vlc_iconv_close )
  "_iconv_open", referenced from:
      _sub_recode in MobileVLCKit(ass.o)
      _vbi_print_page_region in MobileVLCKit(exp-txt.o)
      _export in MobileVLCKit(exp-txt.o)
      _vlc_iconv_open in MobileVLCKit(libc.o)
      _vbi_ucs2be in MobileVLCKit(export.o)
      __vbi_iconv_open in MobileVLCKit(conv.o)
      _export in MobileVLCKit(exp-html.o)
      ...
     (maybe you meant: __vbi_iconv_open, _vlc_iconv_open )
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

解决方法

1、Targets -> General -->Linked Frameworks and Libraries 中,添加 libbz2.dylib,libiconv.dylib两个文件

2、 添加之后如果出现

**duplicate symbols for architecture x86_64 **

处理方法是:
Targets -> Build Setting -->Other Linker Flags 中,找到,并删除
-ObjC


参考链接:

  1. 添加第三方的播放库出现bug
    https://github.com/kewlbear/FFmpeg-iOS-build-script/issues/2
  2. ** duplicate symbols for architecture x86_64 **
    http://stackoverflow.com/questions/24298144/duplicate-symbols-for-architecture-x86-64

你可能感兴趣的:(添加第三方视频库出现的bug)