balkoth
balkoth

Reputation: 738

Do I need to add all the frameworks from my static library?

I have an xcode project (project A) that use another project configured as a static library (project B). In the target section of the project A, I configured the project B as a target dependency, and I add the static library in Link binary with libraries. Also I add the path of project B in the header search paths.

The project B uses a lot of different frameworks from CocoaTouch. If I don't add these frameworks in the project A I got this error

    Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_CABasicAnimation", referenced from

If I add them I got no problems. Is there a way to don't need to add these frameworks? As to mantain all the frameworks in both projects is a difficult task.

Upvotes: 1

Views: 122

Answers (1)

trojanfoe
trojanfoe

Reputation: 122391

No, you must satisfy all the dependencies, framework or otherwise, of the static library.

This is because a static library is a simple archive of object files, so you need to think of them as equivalent to the object files of your binary ("Project A" in your case).

Upvotes: 1

Related Questions