【发布时间】:2013-09-13 01:48:10
【问题描述】:
我在尝试运行单元测试时收到此错误。整个错误是:
Undefined symbols for architecture i386:
"_CGImageRelease", referenced from:
_releaseImages in UIImage+animatedGIF.o
"_CGImageSourceCopyPropertiesAtIndex", referenced from:
_delayCentisecondsForImageAtIndex in UIImage+animatedGIF.o
"_CGImageSourceCreateImageAtIndex", referenced from:
_createImagesAndDelays in UIImage+animatedGIF.o
"_CGImageSourceCreateWithData", referenced from:
+[UIImage(animatedGIF) animatedImageWithAnimatedGIFData:] in UIImage+animatedGIF.o
"_CGImageSourceCreateWithURL", referenced from:
+[UIImage(animatedGIF) animatedImageWithAnimatedGIFURL:] in UIImage+animatedGIF.o
"_CGImageSourceGetCount", referenced from:
_animatedImageWithAnimatedGIFImageSource in UIImage+animatedGIF.o
"_kCGImagePropertyGIFDelayTime", referenced from:
_delayCentisecondsForImageAtIndex in UIImage+animatedGIF.o
"_kCGImagePropertyGIFDictionary", referenced from:
_delayCentisecondsForImageAtIndex in UIImage+animatedGIF.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我在这里做了所有的说明: http://twobitlabs.com/2011/06/adding-ocunit-to-an-existing-ios-project-with-xcode-4/
还将库添加到测试目标的构建短语中的“编译源”中。还是没有运气。
【问题讨论】:
标签: xcode unit-testing testing target