Ios 运行程序时,我得到架构i386:的错误未定义符号

Ios 运行程序时,我得到架构i386:的错误未定义符号,ios,objective-c,compiler-errors,Ios,Objective C,Compiler Errors,我正在尝试将gif添加到图像视图中,因此按照web上的说明,我导入了下载的FLAnimatedImage和FLAnimatedImageView类。我将它们添加到项目中的一个组中,选择了副本,并使用了这些类。现在我得到了15个错误,如下所述 说明部分为: Ld "/Users/mark/Library/Developer/Xcode/DerivedData/iMark_OS-dmxhnswrkktqsacxqtlldejutoqb/Build/Products/Debug-iphonesimul

我正在尝试将gif添加到图像视图中,因此按照web上的说明,我导入了下载的
FLAnimatedImage
FLAnimatedImageView
类。我将它们添加到项目中的一个组中,选择了副本,并使用了这些类。现在我得到了15个错误,如下所述

说明部分为:

Ld "/Users/mark/Library/Developer/Xcode/DerivedData/iMark_OS-dmxhnswrkktqsacxqtlldejutoqb/Build/Products/Debug-iphonesimulator/iMark OS.app/iMark OS" normal i386
    cd "/Users/mark/Desktop/Xcode Projects/iMark OS"
    setenv IPHONEOS_DEPLOYMENT_TARGET 6.1
    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.1.sdk -L/Users/mark/Library/Developer/Xcode/DerivedData/iMark_OS-dmxhnswrkktqsacxqtlldejutoqb/Build/Products/Debug-iphonesimulator -F/Users/mark/Library/Developer/Xcode/DerivedData/iMark_OS-dmxhnswrkktqsacxqtlldejutoqb/Build/Products/Debug-iphonesimulator -filelist "/Users/mark/Library/Developer/Xcode/DerivedData/iMark_OS-dmxhnswrkktqsacxqtlldejutoqb/Build/Intermediates/iMark OS.build/Debug-iphonesimulator/iMark OS.build/Objects-normal/i386/iMark OS.LinkFileList" -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.1 -framework CoreData -framework UIKit -framework Foundation -framework CoreGraphics -o "/Users/mark/Library/Developer/Xcode/DerivedData/iMark_OS-dmxhnswrkktqsacxqtlldejutoqb/Build/Products/Debug-iphonesimulator/iMark OS.app/iMark OS"
错误部分是:

Undefined symbols for architecture i386:
  "_CACurrentMediaTime", referenced from:
      ___42-[FLAnimatedImage addFrameIndexesToCache:]_block_invoke_2 in FLAnimatedImage.o
  "_CGImageSourceCopyProperties", referenced from:
      -[FLAnimatedImage initWithAnimatedGIFData:] in FLAnimatedImage.o
  "_CGImageSourceCopyPropertiesAtIndex", referenced from:
      -[FLAnimatedImage initWithAnimatedGIFData:] in FLAnimatedImage.o
  "_CGImageSourceCreateImageAtIndex", referenced from:
      -[FLAnimatedImage initWithAnimatedGIFData:] in FLAnimatedImage.o
      -[FLAnimatedImage predrawnImageAtIndex:] in FLAnimatedImage.o
  "_CGImageSourceCreateWithData", referenced from:
      -[FLAnimatedImage initWithAnimatedGIFData:] in FLAnimatedImage.o
  "_CGImageSourceGetCount", referenced from:
      -[FLAnimatedImage initWithAnimatedGIFData:] in FLAnimatedImage.o
  "_CGImageSourceGetType", referenced from:
      -[FLAnimatedImage initWithAnimatedGIFData:] in FLAnimatedImage.o
  "_OBJC_CLASS_$_CADisplayLink", referenced from:
      objc-class-ref in FLAnimatedImageView.o
  "_UTTypeConformsTo", referenced from:
      -[FLAnimatedImage initWithAnimatedGIFData:] in FLAnimatedImage.o
  "_kCGImagePropertyGIFDelayTime", referenced from:
      -[FLAnimatedImage initWithAnimatedGIFData:] in FLAnimatedImage.o
  "_kCGImagePropertyGIFDictionary", referenced from:
      -[FLAnimatedImage initWithAnimatedGIFData:] in FLAnimatedImage.o
  "_kCGImagePropertyGIFLoopCount", referenced from:
      -[FLAnimatedImage initWithAnimatedGIFData:] in FLAnimatedImage.o
  "_kCGImagePropertyGIFUnclampedDelayTime", referenced from:
      -[FLAnimatedImage initWithAnimatedGIFData:] in FLAnimatedImage.o
  "_kUTTypeGIF", referenced from:
      -[FLAnimatedImage initWithAnimatedGIFData:] in FLAnimatedImage.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我该如何解决这个问题?

我已经解决了。缺少3个框架:QuartzCore、ImageIO和MobileCoReserves。对于任何有相同问题的未来查看器,您可以查看.h和.m文件,查看它们导入了哪些框架。图像:

.h: m


然后,单击project,进入构建阶段,将二进制文件与库链接,并为项目和projecttest添加框架。不太确定是否必须为这两个项目添加。嗯,这对我有效,所以希望它对其他人有效

仅供参考-您在构建应用程序时出现链接器错误,而不是运行它。看起来您至少需要将
ImageIO
框架添加到项目中。@rmaddy成功了,但现在我得到了,
architecture i386的未定义符号:“\u CACurrentMediaTime”,引用自:\uuuuu42-[FLAnimatedImage AddFrameIndexToCache:]_FLAnimatedImage.o“\u OBJC\u CLASS\u$\u CADisplayLink”中的块2,引用自:FLAnimatedImageView.o中的OBJC CLASS ref“\u UTTypeConformsTo”,引用自:FLAnimatedImage.o“\u kuttypegf”中的-[FLAnimatedImage initWithAnimatedGIFData:]在FLAnimatedImage.o中…我必须删除最后一部分
添加
QuartzCore
框架。可能还有
MobileCoreServices
框架。是的,通常这些类型的编译器错误是由于缺少框架造成的。宾果。当时正在进行FB SDK升级,这为我带来了好处。谢谢