'OCMock/OCMockObject.h' file not found

179 views Asked by At

When I using OCMock in the project, the Xcode shows that 'OCMock/OCMockObject.h' file not found, however I did not modify anything in the OCMock group(folder). As picture shows, the OCMockObject.h exists in the navigator, has anybody met same problem? thanks.enter image description here

1

There are 1 answers

0
Elisa Uhura On

When importing with <...> the compiler/preprocessor needs to have the path to the folder in its header search path.

When using Xcode you are be able to add it by opening you project file, selecting the project in the Project/Targets sidebar. Then inside the Build Settings tab you can add the path to the folder that contains the OCMock folder under the 'Search Paths' > 'Header Search Paths'. In your case you are going to add something like this: $SRCROOT/Something/ThirdParts.

Image for reference of where to add it