Re: Newbie Q: SenTestCase linking problem
Re: Newbie Q: SenTestCase linking problem
- Subject: Re: Newbie Q: SenTestCase linking problem
- From: Chris Hanson <email@hidden>
- Date: Wed, 14 Nov 2007 15:05:57 -0800
On Nov 14, 2007, at 2:16 PM, Tom Davies wrote:
Thanks Chris! I had assumed the former implied the latter -- but you
might have dependencies with only runtime interactions, I suppose.
I also had a problem with GC -- I had set both targets to GC
required, but then got:
15/11/07 8:32:11 AM otest[7849] Error loading /Users/tomd/dev/other/
EddyLib/build/Debug/EddyTest.octest/Contents/MacOS/EddyTest:
dlopen(/Users/tomd/dev/other/EddyLib/build/Debug/EddyTest.octest/
Contents/MacOS/EddyTest, 265): no suitable image found. Did find:
/Users/tomd/dev/other/EddyLib/build/Debug/EddyTest.octest/Contents/
MacOS/EddyTest: GC capability mismatch
in the console. Changing to 'supported' fixed the problem, but I'd
be interested to know what the problem was? Is OCTest incompatible
with GC?
Just as it's Xcode, the name of the unit testing framework for
Objective-C that Xcode includes is "OCUnit." :)
The OCUnit framework itself -- SenTestingKit.framework -- is built to
support both GC and non-GC code. However, the /Developer/Tools/otest
test rig that runs non-application tests is built non-GC in Xcode
3.0. You can't mix GC and non-GC code, so you need to either build
your framework and tests to run under either GC or non-GC (which is
what building GC-supported instead of GC-required does) or you need to
build your own test rig to run under GC.
My instructions on building your own test rig were fleshed out by
Andre on cocoa-dev recently; here's a link to his message on the topic
<http://lists.apple.com/archives/Cocoa-dev/2007/Nov/msg00851.html>
which has a complete main() for your own GC-required otest. See
previous and later messages in that thread for how to tell Xcode to
use that instead of /Developer/Tools/otest, and what you can specify
for the Runpath Search Paths build setting within your test rig as well.
-- Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden