gpt4 book ai didi

xcode - ld : symbol(s) not found for architecture i386 Xcode unit tests

转载 作者:行者123 更新时间:2023-11-28 20:03:22 27 4
gpt4 key购买 nike

当我尝试运行单元测试时出现此错误。整个错误是:

    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/

还将库添加到测试目标的构建短语中的“编译源”。仍然没有运气。

最佳答案

看起来您需要将“CoreGraphics.framework”和“ApplicationServices.framework”添加到您的单元测试目标成员中。

这是对文件的处理方式:

Make sure Target Membership is selected for your .m file

只需转到左侧文件和文件夹列表中的“CoreGraphics.framework”,并确保单元测试目标的复选标记为“ON”。

关于xcode - ld : symbol(s) not found for architecture i386 Xcode unit tests,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18776985/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com