Build fail when using SDWebImage

筅森魡賤 提交于 2019-11-30 01:15:34

问题


I am trying to use the classes of SDWebImage in my project.

I've added the classes to my project and when I try to build it I get 7 errors:

    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)

I am new to XCode and Objective-c so I got no idea what this errors mean.

Anyone?

Thank you.


回答1:


Looks like you need to add MapKit and ImageIO to the project.

To do that:

  1. Click on the project at the top of the project navigator in Xcode.
  2. Select the 'Build Phases' tab.
  3. Open up the 'Link Binary with Libraries' box.
  4. Click the '+'.
  5. App MapKit and ImageIO frameworks.


来源:https://stackoverflow.com/questions/12306161/build-fail-when-using-sdwebimage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!