【问题标题】:Linker error for unit test Xcode 4单元测试 Xcode 4 的链接器错误
【发布时间】:2012-02-10 11:57:23
【问题描述】:

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

当我为 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

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

【问题讨论】:

    标签: ios unit-testing xcode4


    【解决方案1】:

    前缀_CG是CoreGraphics.framework

    【讨论】:

      猜你喜欢
      • 2011-09-10
      • 2011-09-21
      • 1970-01-01
      • 2014-02-04
      • 1970-01-01
      • 1970-01-01
      • 2014-08-12
      • 2023-03-26
      • 1970-01-01
      相关资源
      最近更新 更多