Allen, thank you for the input, i've tried to include $(BUILT_PRODUCTS_DIR)/usr/local/include in the user header search path
but it does not seem to point to the workspace build path, it points to a path that is good only when an application is build on it's own and not part of a workspace.
From the documentation of Xcode 4.
Projects in a Workspace Share a Build Directory
By default, all the Xcode projects in a workspace are built in the same directory, referred to as the workspace build directory. Each workspace has its own build directory. Because all of the files in all of the projects in a workspace are in the same build directory, all of these files are visible to each project. Therefore, if two or more projects use the same libraries, you don’t need to copy them into each project folder separately.
"IF" the statement above is true, why is it that I can't import a header from another project...
Sandro.
On 2011-03-22, at 12:39 PM, Allen Ding wrote: The project I am trying to migrate contains 3 libraries projects
and one iPhone application that uses all these libraries.
Assuming you mean static libraries.
I have recreated the libraries projects inside the workspace, I've configured my libraries to share their headers in the build phase.
If you mean you made the headers 'public' in the copy build phase, I am pretty sure this doesn't do what you would expect as being useful for iPhone static libraries (I believe it copies them to "build_directory/usr/include" or something of the sort). Someone will correct me if I am wrong. I've added the libraries as needed in the application link binary build phase. they all independently compile perfectly.
except for the application that uses them, I am told by the compiler that the imported headers are nowhere to be found.
I've found the simplest, though probably not sexiest way for myself is just to drag the related headers from the libraries into the application project that uses them. You could also add the libraries paths to the Xcode header search paths build settings. Frankly though, the simplicity is a big win for me. - Allen Ding
|