SenTestingKit Framework Linking problems with Cocoa classes on iPhone

Hi there,

Really hoping that someone can help me here as it's driving me mad...

Using the SenTestingKit stuff in iPhone OS 3.1.2, and have got the logic testing stuff all running okay, until I try to include some of my classes which use CLLocation, CLLocationManager etc - then it fails to link, complaining about the following:

".objc class_nameCLLocationManager", referenced from: literal-pointer@__OBJC@....etc
symbol(s) not found
collect2: ld returned 1 exit status

and the same issue for the following:
".objc class_nameCLLocation", referenced from: literal-pointer@__OBJC@...etc
symbol(s) not found
collect2: ld returned 1 exit status

So, I have included all of my own source files in the LogicTest target in my xcode project, which uses other classes such as NSMutableArray etc, and all build okay apart from these 2 errors - do i need to include something somewhere?!

CoreLocation framwork is included in the project already, as the main application works fine normally - only seeing this when i am trying to build the logic test target...

Please help!!

Posted on Jan 5, 2010 5:32 PM

Reply
5 replies

Jan 5, 2010 7:39 PM in response to CFSi

Hi CFSi, and welcome to the Dev Forum!
CFSi wrote:
CoreLocation framwork is included in the project already, as the main application works fine normally - only seeing this when i am trying to build the logic test target...

Have you explicitly added CoreLocation.Framework to the second target? To check, expand Targets in the Groups & Files tree, double click on the Logic Test target icon to open the Info window for that target, click General, and look at the Linked Libraries panel at the bottom of the window. If CL isn't listed, click the '+' icon under the panel (at the very bottom of the Info window).

If the above doesn't help, or for more info in general, see Managing Target Files in the +Xcode Build System Guide+.

\- Ray

Jan 6, 2010 1:36 AM in response to RayNewbie

Hi Ray

Thanks - you've solved that issue for me, very much appreciated!

I now get another error after trying to run the test suite, which is the following:

Test rig '/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3. 1.2.sdk/Developer/usr/bin/otest' exited abnormally with code 138 (it may have crashed).

Any ideas?

A massive thankyou again, very much appreciate the help! Normally have no problems doing dev on iPhone OS, but this is the first time that i have started using the SenTestingKit framework...

Jan 6, 2010 4:06 AM in response to CFSi

Hi,

I'm relatively new to Mac dev as well, but being a experienced Java dev, one of the first things I went looking for was testing frameworks. I tried the supplied sen stuff but found I could not debug through it or run it on the simulator.

So I switched to GHUnit which comes with a simple iPhone app to run the tests you write on the simulator and also allows debugging. It's based on JUnit and I've found it to be really good.

Might be worth a try if you are having no luck with SenTesting.

ciao
Derek

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

SenTestingKit Framework Linking problems with Cocoa classes on iPhone

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.