How can I share code across static libraries without duplicate symbol errors?
- by Ben Flynn
I am new to building static libraries and would like to create 2(+) libraries each of which has some unique code and some shared code. My intention is that other projects will link one or more of these static libraries.
Util.h/m <-- Shared
ImplOne.h/m <-- Unique to 'ImplOne'
ImplTwo.h/m <-- Unique to 'ImplTwo'
I am using XCode and generating the libraries by building Util.m and ImplOne.m in one case, and Util.m and ImplTwo.m in the other.
Of course the issue is that I now cannot use these libraries together because they will have duplicate symbols. What is a better architecture for this situation?