Duplicate symbols (two projects in a workspace use

2019-03-22 02:19发布

A is a module project. There are some test targets and the relevant reusable code is compiled in a separate (static library) target. A uses the third party Lumberjack logging library. The Lumberjack code was simply dropped into the project.

B is a different module project, but otherwise it has the same properties as A.

C is the main project. It depends on A and B. It links the libraries of A and B.

Compiling C will result in duplicate Lumberjack symbols.

How can I have multiple separate module projects so that...

  1. they don't know of each other,
  2. use the same third party code,
  3. can be compiled and tested on their own,
  4. included in a main project without duplicate issues?

7条回答
虎瘦雄心在
2楼-- · 2019-03-22 03:10

Are A and B binaries?

If not you could simply uncheck the compile checkbox for all *.m files of one of the projects, so as to avoid building duplicate objects.

Also if you could use A and B thorough Cocoapods it would be best.

查看更多
登录 后发表回答