Question

I have created a static library in XCode called TestLib. I then created a simple test project that will use this library. I dragged the TestLib xcode project into my test project (frameworks section - if it matters), and set TestLib as a direct dependency of the test project.

I am having trouble importing header files from the Library, I only have 1 in there (its a test project) called TestLibHeader.h, but no matter how I attempt to import them, I get compile errors stating that the header file cannot be found.

Where am I going wrong?

Was it helpful?

Solution

You need to tell your build target where to look for the header files for a given build configuration.

in XCode 3.x

  1. Double click on your build target.
  2. Click on the Build tab.
  3. Search for the build setting Header Search Paths
  4. Set Header Search Paths to include the path the header files in your library project.

See the instructions for setting up three20 as a dependency for a good example of these steps in action.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top