VLCKit mac 版本编译时,遇到的问题处理

错误1: libarchive.a 在编译时报如下错误

Undefined symbols for architecture x86_64:
  "_LZ4_COMPRESSBOUND", referenced from:
      _lz4_filter_read_legacy_stream in libarchive.a(archive_read_support_filter_lz4.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

解决方法是在项目中找到这个源文件,把对函数 LZ4_COMPRESSBOUND 的调用改为LZ4_compressBound

具体步骤如下:

首先使用命令找出文件 archive_read_support_filter_lz4.c 所在路径,然后进入到这个项目中,执行 make clean 对项目编译缓存进行清理。

➜  VLCKit git:(master) ✗ find . -name archive_read_support_filter_lz4.c
./libvlc/vlc/contrib/vlckitbuild/libarchive/libarchive/archive_read_support_filter_lz4.c
./libvlc/vlc/extras/tools/cmake/Utilities/cmlibarchive/libarchive/archive_read_support_filter_lz4.c
➜  VLCKit git:(master) ✗ cd ./libvlc/vlc/contrib/vlckitbuild/libarchive/
➜  libarchive git:(master) ✗ make clean

再然后使用文本编辑器打开 archive_read_support_filter_lz4.c 文件,把 LZ4_COMPRESSBOUND 替换为LZ4_compressBound

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


Verify Code   If you cannot see the CheckCode image,please refresh the page again!