Undefined symbols for architecture i386/armv7s

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.

Undefined symbols for architecture i386/armv7s

Postby Guest » 29 Aug 2014, 15:55

Hello there,
I am trying to use OCMock in my project, but something is going wrong here. I double ckecked if the linker is linking with libOCMock.a library. But the problem here is justa a line:

Code: Select all
Engine *mockEngine = OCMClassMock([Engine class]);
Object *obj = [[Object alloc] init];

[mockEngine startUp];
[mockEngine run];
[mockEngine postEvent:obj];
[NSThread sleepForTimeInterval:0.5];

OCMVerify([mockEngine notify]);   // << THIS LINE CREATES THE LINK PROBLEM..
[mockEngine shutDown];

As you can see above, if I comment that line everything compiles and links!!
here is the error:
Code: Select all
Undefined symbols for architecture i386:
  "OCMMakeLocation(objc_object*, char const*, int)", referenced from:
      -[T009_EngineTest testPostEvent] in T009_EngineTest.o
ld: symbol(s) not found for architecture i386

what is wrong with that??

Return to OCMock