本文介绍了CRC32()在OSX 10.9构建libzip时失踪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经下载libzip最新发布的,我目前试图建立它OSX和失败的:
I've downloaded the latest release of libzip and am currently trying to build it on OSX and failing:
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功能,但它不包括一个也不似乎链接到别的。有没有人能够建立libzip在OSX 10.9?
It needs a crc32 function but it doesn't include one nor does it seem to link to anything else. Has anyone been able to build libzip on OSX 10.9?
推荐答案
您似乎缺少对抗 libz进行
链接。
You seem to be missing to link a against libz
.
某处获取的zlib的开发文件,并添加 -lz
来链接命令。
Get the developer files for zlib somewhere and add -lz
to the link command.
这篇关于CRC32()在OSX 10.9构建libzip时失踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!