我正在尝试用我的项目编译ZipArchive。我导入了所有源文件,包括minizip文件,我不知所措以了解这些错误。我尝试了其他十多种方法将压缩/解压缩合并到我的iphone项目中,但都没有成功。 ZipArchive似乎是最好的库,这个问题似乎是一个简单的build设置配置问题,但我无法弄清楚。
Undefined symbols for architecture armv6:
"_zipClose", referenced from:
-[ZipArchive CloseZipFile2] in ZipArchive.o
"_zipOpenNewFileInZip3", referenced from:
-[ZipArchive addFileToZip:newname:] in ZipArchive.o
"_unzOpenCurrentFile", referenced from:
-[ZipArchive UnzipFileTo:overWrite:] in ZipArchive.o
"_unzGetGlobalInfo", referenced from:
-[ZipArchive UnzipOpenFile:] in ZipArchive.o
"_unzReadCurrentFile", referenced from:
-[ZipArchive UnzipFileTo:overWrite:] in ZipArchive.o
"_unzOpen", referenced from:
-[ZipArchive UnzipOpenFile:] in ZipArchive.o
"_unzCloseCurrentFile", referenced from:
-[ZipArchive UnzipFileTo:overWrite:] in ZipArchive.o
"_zipWriteInFileInZip", referenced from:
-[ZipArchive addFileToZip:newname:] in ZipArchive.o
"_zipOpenNewFileInZip", referenced from:
-[ZipArchive addFileToZip:newname:] in ZipArchive.o
"_unzGoToFirstFile", referenced from:
-[ZipArchive UnzipFileTo:overWrite:] in ZipArchive.o
"_unzGetCurrentFileInfo", referenced from:
-[ZipArchive UnzipFileTo:overWrite:] in ZipArchive.o
"_zipCloseFileInZip", referenced from:
-[ZipArchive addFileToZip:newname:] in ZipArchive.o
"_unzClose", referenced from:
-[ZipArchive UnzipCloseFile] in ZipArchive.o
"_zipOpen", referenced from:
-[ZipArchive CreateZipFile2:] in ZipArchive.o
"_unzGoToNextFile", referenced from:
-[ZipArchive UnzipFileTo:overWrite:] in ZipArchive.o
"_unzOpenCurrentFilePassword", referenced from:
-[ZipArchive UnzipFileTo:overWrite:] in ZipArchive.o
ld: symbol(s) not found for architecture armv6
collect2: ld returned 1 exit status
最佳答案
我有完全一样的问题。我将Xcode 4.4用于iOS 5.1。
我这样解决了:
就是这样-祝你好运。