views:

377

answers:

1

I'm trying to build a project that uses OCUnit to run tests but get the following errors when linking:

ld: warning: in /Developer/SDKs/MacOSX10.5.sdk/Library/Frameworks//SenTestingKit.framework/SenTestingKit, file is not of required architecture
Undefined symbols:
  "_STComposeString", referenced from:
      -[ReaderTest testEmptyFile] in ReaderTest.o
      -[ReaderTest testReadOneLine] in ReaderTest.o
      -[ReaderTest testReadOneLine] in ReaderTest.o

  "_OBJC_CLASS_$_SenTestCase", referenced from:
      _OBJC_CLASS_$_ReaderTest in ReaderTest.o
      _OBJC_CLASS_$_ActionUserInfoReaderTest in ActionUserInfoReaderTest.o
  "_OBJC_METACLASS_$_SenTestCase", referenced from:
      _OBJC_METACLASS_$_ReaderTest in ReaderTest.o
      _OBJC_METACLASS_$_ActionUserInfoReaderTest in ActionUserInfoReaderTest.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

I was able to build and run with OCUnit without any problem before. This problem appeared this week but I can't tell as result of what change. I tried reinstalling XCode with the iPhone SDK 3.2.1 to no avail.

If I do get info on /Library/Frameworks/SenTestingKit.framework/Versions/A/SenTestingKit, I get "Kind: Unix Executable File (PowerPC)". This tends to indicate why I'm having a problem since I'm building on an Intel platform for architecture x86_64. However, I don't understand how it could have worked before and stopped working...

Thanks for your help.

A: 

You seem to have built your own copy of SenTestingKit, and perhaps it has the wrong architectures. It's at /Users/alexandrebeaulieu/workspaces/Project/build/Debug/SenTestingKit.framework.

When you use a shared build location, Xcode prefers to use any framework you've built to one that is installed on the system.

ken
I actually didn't build SenTestingKit but it was copied to my build folder. I removed it and now build with platform path but still get the error "file is not of required architecture".
Alexandre Beaulieu