I have the last version of OCMock (1.55) and XCode 3.2.3.
I have created a test bundle target in my project. What is the best way to use OCMock in my tests? When I add OCMock.framework to the test bundle, this build error appears:
"_OBJC_CLASS_$_OCMockObject", referenced from:
objc-class-ref-to-OCMockObject in NotificationTests.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
I had the same problem, here is how i solved it :
Delete ocmock.framework, the copy file phase, and any search path linking to ocmock header.
check out the latest version from ocmock svn repo : http://svn.mulle-kybernetik.com/OCMock/trunk
Build the OCMockPhoneSim target
Copy the libOCMock.a and Headers folder in your project folder
add the libOCMock.a to your framework and add a link to the headers folder in your target library search path.
Then it works !
Hope this helps.
See Colin Barrett's "OCMock and the iPhone" tutorial.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With