Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7973963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:14:52+00:00 2026-06-04T08:14:52+00:00

I am working on several iOS projects which will have a good bit of

  • 0

I am working on several iOS projects which will have a good bit of shared code, so I’m collecting that code in static libraries.

Now let’s say I have 3 static libraries I’m working with:

  1. Lib A contains generic utility functions
  2. Lib B contains one set of classes
  3. Lib C contains a second set of classes

(and A is a dependency of both B and C)

Now, my final project needs to utilize functionality from all three libraries. I know that A could be staticly linked with B, C, and my final project, but at that point I would get a linker error because there are multiple implementations of the same classes.

How should a situation like this be handled?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T08:14:53+00:00Added an answer on June 4, 2026 at 8:14 am

    For anyone else wondering about this, I’ve found that you can get the behavior I wanted by including header files with each library, but only linking with one.

    In the example I outlined in my question, my primary project would link against A, B and C. However, to use A in libraries B & C, you can include the header files of A in B & C, but then only link against A in the root project.

    If anyone has a better suggestion, please feel free to share.

    As an aside, there’s a project called Cocoapods that is an iOS dependency manager. It seems to be worth keeping an eye on.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several working copies that were checked out of old repositories. The old
I'm working on several Jython projects using libraries written in Java. I'd like to
I am working on several reports all of which have similar layouts I would
I'm working on several processes which could potentially run into problems that must be
I have an app prototype that was working on Iphone4 + iOS 4.3, build
I have several working sets in my eclipse which i often switch from one
I'm working on several iOS projects where I think enumerated datatypes would be helpful
I find myself currently working on several projects which include user entries in a
For some current projects, I'm working with several data structures that are pretty large
Sometimes I'm working with several branches at once. Say I have branches called master,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.