2

As mentioned in title I need some help on working workspace with static libraries! This is my situation:

  1. App project;
  2. Library A
  3. Library B

The depends:

  • App projects depends by Library A and Library B
  • Library A depends by Library B
  • Library B is atomic

So ... I have tried a lot of configurations, linking B to A, and A to App; or linking B to A and A & B to App ... but always have error from linker. In first case linker cannot find symbols of library B, in second case linker return error of symbol duplicate in A and B!

Someone can help me please???

fncap
  • 126
  • 5

1 Answers1

2

Static libraries can't link with each other. If Library A depends on Library B, all you need to do is to link your App to both libraries A and B.

If you still get a linker error, my guess is that one of the libraries adds an Objective-C category and you've run into the well-known issue that needs to be resolved with -force_load. See this answer.

Community
  • 1
  • 1
CodeSmile
  • 64,284
  • 20
  • 132
  • 217