14

我正在尝试在我的项目中使用SDWebImage的类。

我已将这些类添加到我的项目中,当我尝试构建它时,出现 7 个错误:

    Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_MKAnnotationView", referenced from:
      l_OBJC_$_CATEGORY_MKAnnotationView_$_WebCache in MKAnnotationView+WebCache.o
  "_CGImageSourceCreateIncremental", referenced from:
      -[SDWebImageDownloader connection:didReceiveData:] in SDWebImageDownloader.o
  "_CGImageSourceUpdateData", referenced from:
      -[SDWebImageDownloader connection:didReceiveData:] in SDWebImageDownloader.o
  "_CGImageSourceCopyPropertiesAtIndex", referenced from:
      -[SDWebImageDownloader connection:didReceiveData:] in SDWebImageDownloader.o
  "_CGImageSourceCreateImageAtIndex", referenced from:
      -[SDWebImageDownloader connection:didReceiveData:] in SDWebImageDownloader.o
  "_kCGImagePropertyPixelHeight", referenced from:
      -[SDWebImageDownloader connection:didReceiveData:] in SDWebImageDownloader.o
  "_kCGImagePropertyPixelWidth", referenced from:
      -[SDWebImageDownloader connection:didReceiveData:] in SDWebImageDownloader.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我是 XCode 和 Objective-c 的新手,所以我不知道这个错误是什么意思。

任何人?

谢谢你。

4

1 回答 1

53

看起来您需要添加MapKitImageIO到项目中。

要做到这一点:

  1. 单击 Xcode 中项目导航器顶部的项目。
  2. 选择“构建阶段”选项卡。
  3. 打开“将二进制文件与库链接”框。
  4. 单击“+”。
  5. 应用 MapKit 和 ImageIO 框架。
于 2012-09-06T18:26:21.777 回答