Ahsan
Ahsan

Reputation: 2982

Project fails to build because KIF classes are missing

Project fails to build because KIF classes are missing.

I am trying with a simple app and have strictly followed the github readme. Also, I have double checked whatever is mentioned in the read me for this issue. I still cant make my app build/ run the tests.

Can anyone kindly help me with this issue ?

Thanks. Ahsan

Error :

ld: warning: ignoring file /Users/ahsan/Desktop/Others/LoginExampleKIF/libKIF.a, missing required architecture i386 in file /Users/ahsan/Desktop/Others/LoginExampleKIF/libKIF.a (2 slices)

Undefined symbols for architecture i386:

  "_OBJC_CLASS_$_KIFTestController", referenced from:
      _OBJC_CLASS_$_EXTestController in EXTestController.o

  "_OBJC_CLASS_$_KIFTestScenario", referenced from:
      objc-class-ref in EXTestController.o
      objc-class-ref in KIFTestScenario+EXAdditions.o
      l_OBJC_$_CATEGORY_KIFTestScenario_$_EXAdditions in KIFTestScenario+EXAdditions.o

  "_OBJC_CLASS_$_KIFTestStep", referenced from:
      objc-class-ref in KIFTestScenario+EXAdditions.o
      objc-class-ref in KIFTestStep+EXAdditions.o
      l_OBJC_$_CATEGORY_KIFTestStep_$_EXAdditions in KIFTestStep+EXAdditions.o

  "_OBJC_METACLASS_$_KIFTestController", referenced from:
      _OBJC_METACLASS_$_EXTestController in EXTestController.o

ld: symbol(s) not found for architecture i386

clang: error: linker command failed with exit code 1 (use -v to see invocation)

Upvotes: 1

Views: 910

Answers (1)

James Zaghini
James Zaghini

Reputation: 4001

From your error message, it seems like you are trying to run your app on the simulator, but aren't building for the i386 architecture.

I just checked KIF out from github, and at this time it's not set up to build for i386

Set your "Architectures" & "Valid Architectures" to i386, armv7 & armv7s. Then clean and build again. You may need to do this for your own app's target too, but I assume your app would be set to build for i386 also, unless you removed it.

After

Let me know how you go :D

Upvotes: 1

Related Questions