加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

iphone – ZipArchive库编译错误

发布时间:2020-12-14 19:47:06 所属栏目:百科 来源:网络整理
导读:我已经包括在内 libz.1.2.3.dylib 插入代码后 ZipArchive* za = [[ZipArchive alloc] init]; 编译时出错 "_OBJC_CLASS_$_ZipArchive",referenced from: UPDATE 根据http://code.google.com/p/ziparchive/wiki/PageName 我已将ZipArchive文件夹包含到项目中,
我已经包括在内
libz.1.2.3.dylib

插入代码后

ZipArchive* za = [[ZipArchive alloc] init];

编译时出错

"_OBJC_CLASS_$_ZipArchive",referenced from:

UPDATE

根据http://code.google.com/p/ziparchive/wiki/PageName

我已将ZipArchive文件夹包含到项目中,并且包含框架libz.1.2.3.dylib.

然后我尝试解压缩iphone上的文件,但它有关框架的错误.怎么解决?

Ld build/ePUBreader.build/Debug-iphoneos/ePUBreader.build/Objects-normal/armv7/ePUBreader normal armv7
cd /Users/ragopor/Desktop/ePUBreader
setenv IPHONEOS_DEPLOYMENT_TARGET 4.0
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk -L/Users/ragopor/Desktop/ePUBreader/build/Debug-iphoneos -F/Users/ragopor/Desktop/ePUBreader/build/Debug-iphoneos -filelist /Users/ragopor/Desktop/ePUBreader/build/ePUBreader.build/Debug-iphoneos/ePUBreader.build/Objects-normal/armv7/ePUBreader.LinkFileList -dead_strip -miphoneos-version-min=4.0 -framework Foundation -framework UIKit -framework CoreGraphics -framework StoreKit -lz.1.2.3 -o /Users/ragopor/Desktop/ePUBreader/build/ePUBreader.build/Debug-iphoneos/ePUBreader.build/Objects-normal/armv7/ePUBreader

Undefined symbols:
  "_OBJC_CLASS_$_ZipArchive",referenced from:
      objc-class-ref-to-ZipArchive in ePUBreaderAppDelegate.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

解决方法

将ZipArchive文件夹拖到项目中时,必须选择“为任何添加的文件夹创建组”而不是“为任何添加的文件夹创建文件夹引用”.如果选择后者,则会从链接器中获取Undefined Symbol错误.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读