gpt4 book ai didi

ios - 单元测试 Xcode 4 的链接器错误

转载 作者:塔克拉玛干 更新时间:2023-11-02 10:17:12 26 4
gpt4 key购买 nike

我的应用程序在运行时构建良好,单元测试也构建良好

当我为 CGAffineTransform 添加一些代码时,单元测试失败(应用程序仍然正常)

模拟器和设备的行为相同

错误信息:

Undefined symbols for architecture i386:
"_CGAffineTransformMakeTranslation", referenced from:
-[PhysicsObject hasPoint:] in PhysicsObject-23B4A02B8F0621AD.o
"_CGAffineTransformMakeRotation", referenced from:
-[PhysicsObject hasPoint:] in PhysicsObject-23B4A02B8F0621AD.o
"_CGAffineTransformConcat", referenced from:
-[PhysicsObject hasPoint:] in PhysicsObject-23B4A02B8F0621AD.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/ http://sealedabstract.com/code/tired-of-getting-mach-o-linker-errors-when-unit-testing/ Apple Mach-O Linker Error when compiling for device

没有任何效果 :( 我怀疑这与一个框架有关,特别是没有找到。我似乎无法确定是哪个框架。非常感谢帮助。

最佳答案

前缀 _CG 是 CoreGraphics.framework

关于ios - 单元测试 Xcode 4 的链接器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9227384/

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