使用GHUnit编译单元测试的架构问题

时间:2012-11-02 05:21:12

标签: iphone ios xcode4.5 gh-unit

使用的是Xcode 4.5。

最近我已经下载了GHunit框架并按照link设置了它。

在编译目标时,我收到下面提到的错误。需要你宝贵的建议。

Undefined symbols for architecture i386:
      "_CACurrentMediaTime", referenced from:
          _GHRunForInterval in GHUnitIOS(GHTestUtils.o)
          _GHRunUntilTimeoutWhileBlock in GHUnitIOS(GHTestUtils.o)
    ld: symbol(s) not found for architecture i386
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

2 个答案:

答案 0 :(得分:24)

CACurrentMediaTimeCABase.h宣布并在QuartzCore框架中实施,您需要将其链接到该项目。

答案 1 :(得分:1)

在我们的学校移动应用程序开发课程中,我们一直在使用本教程 http://www.raywenderlich.com/3716/unit-testing-tutorial-for-ios-xcode-4-quick-start-guide

如果没有QuartzCore.framework也不会运行,所以非常感谢你!