Currently, I have one Xcode project for a very large code base, I will name it Project X , which I divide into a bunch of subprojects ( Projects A, B, C ).
So far, each of these projects compiles on its own, just fine. They all create static libraries. Project B and Project C depend on the static library Project A created for the build.
I have another xcode project, Project Z , which requires the static libraries created by Projects B and C. This is the problem. When Project Z enters the linker phase, everything is fine - the characters in libs are duplicated for Projects B and C for the code originally associated with it in Project A
I'm new to the world of static libraries, and I'm not sure how to move forward with Project Z , or how to change other projects so that they link to the same Project A lib. I have a feeling that this is impossible. What are my options?
Edit:
I must clarify that Project B and Project C need to be integrated into separate static libraries, because some clients only need one or the other.
In addition, I have this dilemma on both OSX and iOS platforms.
I understand that I could solve this problem on OSX by building projects as dynamic libraries. However, I would rather not do this, and it still leaves me the same problem on iOS.
design linker xcode static-libraries
Jeff Jul 31 '12 at 23:14 2012-07-31 23:14
source share