我不明白为什么我有这个问题。希望有人能帮我解决这个问题。我试图导入pushwoosh框架,并有这个奇怪的错误,而建设项目。我所做的只是将框架从那个SDK文件夹拖放到我的Frameworks文件夹中,然后构建项目。令我感到奇怪的是,我找不到其他人有这个问题。我使用的是最新的pushwoosh SDK,针对类似的问题尝试了多种解决方案,但都没有解决。
Undefined symbols for architecture arm64:
"_deflate", referenced from:
pushwoosh::zipWriteInFileInZip(void*, void const*, unsigned int) in Pushwoosh(zip.o)
pushwoosh::zipCloseFileInZipRaw(void*, unsigned long, unsigned long) in Pushwoosh(zip.o)
"_inflate", referenced from:
pushwoosh::unzReadCurrentFile(void*, void*, unsigned int) in Pushwoosh(unzip.o)
"_deflateInit2_", referenced from:
pushwoosh::zipOpenNewFileInZip3(void*, char const*, pushwoosh::zip_fileinfo const*, void const*, unsigned int, void const*, unsigned int, char const*, int, int, int, int, int, int, char const*, unsigned long) in Pushwoosh(zip.o)
"_deflateEnd", referenced from:
pushwoosh::zipCloseFileInZipRaw(void*, unsigned long, unsigned long) in Pushwoosh(zip.o)
"_inflateInit2_", referenced from:
pushwoosh::unzOpenCurrentFile3(void*, int*, int*, int, char const*) in Pushwoosh(unzip.o)
"_inflateEnd", referenced from:
pushwoosh::unzCloseCurrentFile(void*) in Pushwoosh(unzip.o)
"_crc32", referenced from:
-[PWZipArchive addFileToZip:newname:] in Pushwoosh(PWZipArchive.o)
pushwoosh::unzReadCurrentFile(void*, void*, unsigned int) in Pushwoosh(unzip.o)
pushwoosh::zipWriteInFileInZip(void*, void const*, unsigned int) in Pushwoosh(zip.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
想法吗?提前感谢!
您需要添加libz。Dylib到项目:
这样做:
转到目标部分构建阶段选项卡链接二进制文件与库点击+按钮搜索libz.dylib点击添加按钮