I have an Xcode workspace with a user interface (UI) project and a core logic project (Core). I want to run OCUnit unit tests in a user interface project, so I added a new test target, as is usually done.
I can run the tests very well until I put in the import statements the classes in the main target of the user interface, which in turn refer to the main project.
The error I get is the "Lexical or preprocessing release" xxx.h "file not found." I do not receive this message when I directly create the main user interface object.
It is as if the main user interface object knows about Core when it is built, but when it refers to a test object, it seems to know nothing about Core.
I took the step of adding a link to the main project using Linking Binary Files to Libraries. The item in the list remains red. Key? Perhaps, but the red link in the list of links does not prevent the creation of a user interface and uses the main classes. I also made the main goal the dependence of the test goal.
source share