当我尝试使用Xcode编译时,我得到以下错误:
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)
SDWebImage类必定存在问题,MWPhotoBrowser使用该类。 这真的很奇怪而且令人困惑,我不知道如何解决它。
谢谢你们。
答案 0 :(得分:57)
问题很可能是该项目不包括ImageIO框架。转到目标 - >构建阶段 - >链接并验证您实际上在那里有ImageIO。
答案 1 :(得分:2)
我认为我有解决方案......
转到应用的目标,在右侧,点击构建阶段标签,然后点击编译源部分在 + 上添加SDWebImage.m
希望有所帮助!