5

I'm trying to add OCMock to my current project using the instructions at ocmock.org.

  1. Added the library and the headers to the project.
  2. Made sure that the libOCMock.a is added to my test target.
  3. Added the search path to the header files in Header Search Paths under Build Settings for the test target.
  4. Added the flags -force_load, PATH/TO/libOCMock.a and -ObjC to Other Linker Flags (also to the test target).
  5. Finally I import the headers in a test class like this: #import <OCMock/OCMock.h>

The first thing that happens is that Xcode complains about not finding the headers. If I go ahead and try to build the test target I get an error: OCMock/OCMock.h not found.

When I check the build output I can se that it is adding the correct search path: -I/Users/username/Development/proj/iphone/frameworks/OCMock_2_0_1/headers

When I list the path in the terminal I can clearly see the files there.

Any help or pointers in the right direction would be greatly appreciated. <3

ABeanSits
  • 1,725
  • 1
  • 17
  • 34

1 Answers1

2

Solved it with the help of a friend (thank you so much A.)!

I had changed the name of the folder that contained the headers to headers while the import was pointing to OCMock/OCmock.h. :/

ABeanSits
  • 1,725
  • 1
  • 17
  • 34