views:

36

answers:

1

Hi,

I am using XCode 3.2.2 to unit test some custom data types. The tests run properly without those data types, but when I use said data types, I get this error:

"_OBJC_CLASS_$_classname", referenced from:

(where "classname" is the, well, class name...)

I have seen hints online that it could be linker related. The strange thing is, I originally followed these instructions http://www.mobileorchard.com/ocunit-integrated-unit-testing-in-xcode/ and they worked for me the first time I tried them. Now, after following the same instructions, I'm getting the same error. Any help would be greatly appreciated.

Thanks!

-Matt

+1  A: 

Unfortunately your question is pretty ambiguous.

First, is the example working given in the mentioned tutorial?

Second, I'd double check your code:

  1. Right click the class (.m) you're trying to use with OCUnit and click get info. Make sure the target in the class file is pointing to OCUnit! This is key for the linking.

  2. Are you importing your .h for the associated class in the test case?

  3. Check the spelling of the class names?
Chad
Thank you sir, it was in fact that I had not included the proper .m files in my OCUnit target. Thank you!
mag725