I am trying to use the new Xcode4 workspace feature to migrate some Xcode3 projects that has dependencies between them. I have a project which creates a static library and then an application project which depends on the static library. So, as the guide mentioned, I created a new workspace and dragged both the projects into the workspace. However, when I build my application, it's unable to find the header files from my static library. I get "No such file or directory" error. My intention is to let Xcode auto detect the dependencies. But, not sure what I am doing wrong, I couldn't get it to work. Any help is greatly appreciated. There isn't much documentation out there either.
Xcode4 workspace sharing projects
3k Views Asked by user320587 AtThere are 3 best solutions below

There are at least a couple of ways to go about this.
What I do is set a value for the User Header Search Path build setting for the main target, pointed to the library path. Just type 'user header' in the build settings editor search box and you'll find it.
If you're consuming a library that you intend to use often, it's best to set up a source tree setting for it. This is in XCode Prefs -> Source Trees. Add an entry, put in the path to the library source, and give it a sensible Setting Name, eg. XXLIBRARY_SOURCE. Then in the user header search path (or any other build setting where you need the library path), you can use $(XXLIBRARY_SOURCE) as the path.
A simpler but less flexible alternative is just to drag the library's headers into your main project.
After few frustrating hours, I may have found a solution (still not sure if it's the right way).
Did a clean and build and everything was built successfully.
However, I am still not convinced this is the right way, as according to Xcode4 guide, no changes to settings is necessary, just adding projects to workspace will take care of everything. Someday, I hope to find the correct solution and use it.
Thanks Javid