17

When i'am trying to compile with Xcode i get the following errors:

Undefined symbols for architecture i386:
  "_CGImageSourceCopyPropertiesAtIndex", referenced from:
      -[SDWebImageDownloader connection:didReceiveData:] in SDWebImageDownloader.o
  "_CGImageSourceCreateImageAtIndex", referenced from:
      -[SDWebImageDownloader connection:didReceiveData:] in SDWebImageDownloader.o
  "_CGImageSourceCreateIncremental", referenced from:
      -[SDWebImageDownloader connection:didReceiveData:] in SDWebImageDownloader.o
  "_CGImageSourceUpdateData", referenced from:
      -[SDWebImageDownloader connection:didReceiveData:] in SDWebImageDownloader.o
  "_OBJC_CLASS_$_MFMailComposeViewController", referenced from:
      objc-class-ref in MWPhotoBrowser.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)

There must be a problem with SDWebImage class, which MWPhotoBrowser use. This is really strange and confusing, and I don't know how to fix it.

Thanks guys.

DevFly
  • 413
  • 3
  • 15
  • Please check http://stackoverflow.com/questions/12306161/build-fail-when-using-sdwebimage it works for me – victormfv Apr 27 '13 at 03:47

2 Answers2

57

The problem is most likely that the project is not including the ImageIO framework. Go to your Target -> Build Phases -> Link and verify that in fact you have ImageIO there.

David H
  • 40,852
  • 12
  • 92
  • 138
  • +1 Thanks, worked for me. I got same error while adding [MWPhoto](https://github.com/mwaterfall/MWPhotoBrowser) in my project. :) – HDdeveloper Jan 20 '13 at 15:26
2

I think that i have the solution...

Go to to the target of your app and on the right, click on the Build Phases tab and in the Compile Sources Section click on + and add the SDWebImage.m

Hope that helps !

Ali Abbas
  • 4,247
  • 1
  • 22
  • 40