Unfortunately, this was not working under XCode as when we linked in our libraries, there was always some symbol or other which was not available, and we ended up putting large amounts of code into the main project and compiling it for each application level (making our build process at least twice as long as it should have been).
My boss finally got so sick of this he spent a couple days tracking down the problem, and it was that our static libraries were dependent upon other static libraries, but those libraries were not linked in until the application as a whole was linked. Somehow, this confused the XCode linker (ld) and it ended up missing symbols. The trick was to link the other sub-dependent libraries into the libraries static libraries and not directly from the main project.
I know the above is confusing. Here's a more graphical description.
(Before)
- Main Project
- Static Library 1 Project (needs Static Library 2 & 3)
- Static Library 2 Project
- Static Library 3 Project
(Now)
- Main Project
- Static Library 1 Project (needs Static Library 2 & 3)
- Static Library 2 Project
- Static Library 3 Project