title: Linking static libraries, that share another static library
body: <p>I currently have a single Xcode project for a very large code base, I'll call it <strong>Project X</strong>, which I am dividing into a bunch of sub projects ( <strong>Projects A, B, C</strong> ).</p>
  
  <p>So far, each of these projects compiles, on their own, just fine. They all produce static libraries. <strong>Project B</strong> and <strong>Project C</strong> are dependent on the static library produced by <strong>Project A</strong> in order to build.</p>
  
  <p>I have another xcode project, <strong>Project Z</strong>, that requires the static libraries produced by <strong>Projects B and C</strong>. Herein lies the problem. When <strong>Project Z</strong> enters the linker phase, things blow up - duplicate symbols are found within the libs for <strong>Projects B and C</strong> for the code they originally linked against in <strong>Project A</strong>!</p>
  
  <p>I'm pretty new to the world of static libraries, and I'm unsure of how to move forward with <strong>Project Z</strong>, or how to modify the other projects so that they are linking against the same <strong>Project A</strong> lib. I have a feeling it's not possible. What are my options here?</p>
  
  <p>Edit:</p>
  
  <p>I should clarify that <strong>Project B</strong> and <strong>Project C</strong> need to build into separate static libs because some clients will only require one or the other.</p>
  
  <p>Also, I'm having this dilemma on both OSX and iOS platforms.</p>
  
  <p>I realize that I could solve this problem on OSX by building the projects as dynamic libraries. However, I'd prefer not to do this, and it still leaves me with same issue on iOS.</p>