OCMock for iPad project

Discussion of the OCMock framework. If you have patches we would prefer you to send them to the mailing list, but attaching them to a topic is possible, too.

OCMock for iPad project

Postby roypa » 19 Mar 2011, 15:12

I'm trying to get a project going with OCMock. I have OCMock 1.77 installed.

I've got everything setup by following the same instructions as for the iPhone.

If I add the following line to one of my test:
Team* t = [OCMockObject mockForClass:[Team class]];

Everything "Build"s fine if I just do a Clean and Build. But when I "Test", I get the following link "Build" error:

Ld /Users/pascalroy/Library/Developer/Xcode/DerivedData/Valkyrie-cleenolttmyqxkffmyfuxvemsbot/Build/Products/Debug-iphonesimulator/ValkyrieTests.octest/ValkyrieTests normal i386
cd /Users/pascalroy/Documents/Valkyrie
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 -arch i386 -bundle -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -L/Users/pascalroy/Library/Developer/Xcode/DerivedData/Valkyrie-cleenolttmyqxkffmyfuxvemsbot/Build/Products/Debug-iphonesimulator -F/Users/pascalroy/Library/Developer/Xcode/DerivedData/Valkyrie-cleenolttmyqxkffmyfuxvemsbot/Build/Products/Debug-iphonesimulator -F/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/Developer/Library/Frameworks -F/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/Developer/Library/Frameworks -F/Applications/Libraries/ocmock/ocmock-1.77 -filelist /Users/pascalroy/Library/Developer/Xcode/DerivedData/Valkyrie-cleenolttmyqxkffmyfuxvemsbot/Build/Intermediates/Valkyrie.build/Debug-iphonesimulator/ValkyrieTests.build/Objects-normal/i386/ValkyrieTests.LinkFileList -mmacosx-version-min=10.6 -bundle_loader /Users/pascalroy/Library/Developer/Xcode/DerivedData/Valkyrie-cleenolttmyqxkffmyfuxvemsbot/Build/Products/Debug-iphonesimulator/Valkyrie.app/Valkyrie -framework SenTestingKit -Xlinker -objc_abi_version -Xlinker 2 -framework UIKit -framework Foundation -framework CoreGraphics -framework OCMock -o /Users/pascalroy/Library/Developer/Xcode/DerivedData/Valkyrie-cleenolttmyqxkffmyfuxvemsbot/Build/Products/Debug-iphonesimulator/ValkyrieTests.octest/ValkyrieTests

Undefined symbols for architecture i386:
"_OBJC_CLASS_$_OCMockObject", referenced from:
objc-class-ref in PlatoonTests.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status

"_OBJC_CLASS_#_OCMockOBject", referenced from:
Objc-class-ref in ....
Symbol(s) not found for architecture i386
Collect2: Id returned 1 exit status



Any idea what I'm doing wrong or what's missing in my configuration to get things working?

Thanks,
Pascal
roypa
 
Posts: 1
Joined: 19 Mar 2011, 15:02

Return to OCMock



cron