architecture issue on compiling unit test using GHUnit
Asked Answered
D

2

8

Am using Xcode 4.5.

Recently i have download GHunit framework and setup it by following link.

On compiling the target, am getting the error mentioned below. need your valuable suggestion.

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)
Defame answered 2/11, 2012 at 5:21 Comment(0)
S
24

CACurrentMediaTime is declared at CABase.h and implemented at QuartzCore framework, you'll need to link it to the project.

Shelleyshellfire answered 2/11, 2012 at 11:28 Comment(4)
@Defame Please uncheck the answer if it doesn't solve the problem, if you found another solution you are always welcome to answer yourself and accept it instead.Shelleyshellfire
And for the persone down-voted the answer, here's the GHUnit source file from the (currently) latest version tag, there you can see import of the QuartzCore header: github.com/gabriel/gh-unit/blob/0.5.6/Classes-iOS/…Shelleyshellfire
You are correct. The error is due to QuartzCore framework not linked. Let me up vote for you.Boride
@Defame could you try updating GHunit to the latest version and check if this solution works for you ? It seems to be helpful for other users, let's try to find out what is different for you.Shelleyshellfire
R
1

In our mobile application development course at school, we have been using this tutorial http://www.raywenderlich.com/3716/unit-testing-tutorial-for-ios-xcode-4-quick-start-guide

And It does not Run without the QuartzCore.framework as well, so thank you very much !

Ref answered 15/2, 2014 at 19:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.