ios - 架构 i386 : "_OBJC_CLASS_$_ZipException", 的 undefined symbol 引用自:错误

标签 ios objective-c xcode cocoa-touch xcode4.5

我在我的项目中使用了一些“.o”文件,并且在编译时显示以下错误,

error:linker command failed with exit code 1 (use -v to see invocation)

我已经在下面发布了错误日志

Ld /Users/deepak/Library/Developer/Xcode/DerivedData/app-bnwpvhpbrfdurbdgxucyddqyfosh/Build/Products/Debug-iphonesimulator/app.app/app normal i386
    cd /Users/deepak/Workspace/iosDevelopement/PROJECTS/KML/app
    setenv IPHONEOS_DEPLOYMENT_TARGET 4.3
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk -L/Users/deepak/Library/Developer/Xcode/DerivedData/app-bnwpvhpbrfdurbdgxucyddqyfosh/Build/Products/Debug-iphonesimulator -F/Users/deepak/Library/Developer/Xcode/DerivedData/app-bnwpvhpbrfdurbdgxucyddqyfosh/Build/Products/Debug-iphonesimulator -F/Users/deepak/Workspace/iosDevelopement/PROJECTS/KML/app -filelist /Users/deepak/Library/Developer/Xcode/DerivedData/app-bnwpvhpbrfdurbdgxucyddqyfosh/Build/Intermediates/app.build/Debug-iphonesimulator/app.build/Objects-normal/i386/app.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=4.3 -lstdc++ -licucore -lz -framework MapKit -framework CoreLocation -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics -framework KML -o /Users/deepak/Library/Developer/Xcode/DerivedData/app-bnwpvhpbrfdurbdgxucyddqyfosh/Build/Products/Debug-iphonesimulator/app.app/app
Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_ZipException", referenced from:
      objc-class-ref in ZipFile.o
      objc-class-ref in ZipReadStream.o
      objc-class-ref in ZipWriteStream.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

一开始错误较多,通过引入libs.dylib框架解决,

但仍然存在 2 个错误。

编辑:我已经完成了热门问题 Undefined symbols for architecture i386: _OBJC_CLASS_$_SKPSMTPMessage", referenced from: error , 但该解决方案对我不起作用

有谁知道我错在哪里?我是 xcode 的问题,缺少库或链接失败吗?

提前致谢

最佳答案

错误消息指出 undefined symbol 被 ZipFile.oZipReadStream.oZipWriteStream.o 引用。这意味着您正在尝试使用 Objective-Zip您应用中的库。

undefined symbol 是 _OBJC_CLASS_$_ZipException。编译器在看到源文件中的 @implemention ZipException 指令时生成此符号。

Objective-Zip 库包含一个名为 ZipException.m 的文件,其中包含 @implementation ZipException 指令。

最可能的解释是您根本没有在目标中包含 ZipException.m。检查你是否这样做了。如果您不知道如何,请查看this answer .

另一种可能的解释是,您修改了 ZipException.m 文件,可能是不小心修改了 @implementation ZipException 指令或对编译器隐藏了它.检查您是否没有修改该文件,并且它包含 @implementation ZipException 指令。

关于ios - 架构 i386 : "_OBJC_CLASS_$_ZipException", 的 undefined symbol 引用自:错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14157632/

相关文章:

ios - 将 NSArray 值转换为 int

ios - 如何检查用户是否从 iOS 上的另一个应用程序调用我的应用程序?

ios - 使用当前时间从数组计算最近的时间

objective-c - 如何检查 NSArray 条目中是否包含字符串?

ios - UITableViewCell 被空数据源数组卡住

ios - 保持 NSUserActivity 向后兼容 Xcode 9

ios - 使用生产 apns 测试推送通知

iphone - 使用 CoreData 保存图像后分辨率发生变化

ios - 使 UITextView 变小的约束

ios - iOS iBeacon 如何设置扫描间隔时间?