使用SDWebImage时构建失败

时间:2012-09-06 18:25:12

标签: objective-c xcode sdwebimage

我正在尝试在我的项目中使用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的新手,所以我不知道这个错误意味着什么。

任何?

谢谢。

1 个答案:

答案 0 :(得分:52)

您似乎需要将MapKitImageIO添加到项目中。

要做到这一点:

  1. 点击Xcode中项目导航器顶部的项目。
  2. 选择“构建阶段”选项卡。
  3. 打开“链接二进制文件库”框。
  4. 点击“+”。
  5. App MapKit和ImageIO框架。