gpt4 book ai didi

在 OSX 10.9 上构建 libzip 时缺少 crc32()

转载 作者:太空狗 更新时间:2023-10-29 14:51:51 28 4
gpt4 key购买 nike

我已经下载了最新版本的 libzip,目前正在尝试在 OSX 上构建它,但失败了:

Linking C shared library libzip.dylib
Undefined symbols for architecture x86_64:
"_crc32", referenced from:
__zip_filerange_crc in zip_filerange_crc.o
_crc_read in zip_source_crc.o
_decrypt in zip_source_pkware.o
__zip_string_crc32 in zip_string.o
(maybe you meant: __zip_string_crc32)
"_deflate", referenced from:
_compress_read in zip_source_deflate.o
(maybe you meant: _zip_source_deflate)
"_deflateEnd", referenced from:
_deflate_compress in zip_source_deflate.o
"_deflateInit2_", referenced from:
_deflate_compress in zip_source_deflate.o
"_inflate", referenced from:
_decompress_read in zip_source_deflate.o
"_inflateEnd", referenced from:
_deflate_decompress in zip_source_deflate.o
"_inflateInit2_", referenced from:
_deflate_decompress in zip_source_deflate.o
"_zError", referenced from:
__zip_error_strerror in zip_error_strerror.o
_zip_error_to_str in zip_error_to_str.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [libzip.3.0.dylib] Error 1
make[2]: *** [CMakeFiles/zip.dir/all] Error 2
make[1]: *** [CMakeFiles/zip.dir/rule] Error 2
make: *** [zip] Error 2

它需要一个 crc32 函数,但它不包含一个也似乎没有链接到任何其他东西。有没有人能够在 OSX 10.9 上构建 libzip?

最佳答案

您似乎缺少针对 libz 的链接。

在某处获取 zlib 的开发人员文件,并将 -lz 添加到链接命令的(命令行末尾)。

关于在 OSX 10.9 上构建 libzip 时缺少 crc32(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20424110/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com