I Have an iOS application that I am trying to add OCMock to in order to better unit test it. I've followed the instruction on ocmock.org as well as instructions I've found in other places but still I cannot get my test code to compile.
Here's what I've done
Added the source code to my project directory
Create the groups in my project to mimic my file system
I selected the option to add to my test targets so the framework was added appropriately as well as the Library Search Path
Then I manually added the headers to the Header Search Path
And added the -ObjC linker flag
Then when I go to import the header file, I get the file not found error
Any ideas what I am missing here???
You have the search path test/libraries/OCMock
. Then you have #import <OCMock/OCMock.h>
.
This fails because there is no file test/libraries/OCMock/OCMock/OCMock.h
.
You use the search path test/libraries
, or you can create a prefix directory to hold OCMock
and have the search path point at that.
I generally have a directory with the library name and version number before the actually directory.
The directory test/libraries/OCMock-X.X.X
could contain the OCMock
directory. That way the search path still be more specific: test/libraries/OCMock-X.X.X
and you still use OCMock/OCMock.h
as the include.
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