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

  • Home
  • SEARCH
  • 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 7892839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:58:05+00:00 2026-06-03T06:58:05+00:00

I’m trying to build an iOS library/framework, which for the sake of simplicity we’ll

  • 0

I’m trying to build an iOS library/framework, which for the sake of simplicity we’ll say exposes some class A to projects using it. Now the problem is that class A depends upon class B, which is not meant to be exposed (or even included as a symbol) in the build output for the library. This causes problems because there is another library with class C in it that also happens to rely on class B.

What happens is that if I attempt to include both libraries in a project, the linker complains about having multiple definitions of class B.

What is the best way to work around this issue? Is it possible to set class B to be weakly linked when building the two libraries (or at least one of the two libraries), and if so, how?

Or should class B be extracted into its own library/framework and the two libraries modified to reference that instead of including class B as a source file?

  • 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-03T06:58:07+00:00Added an answer on June 3, 2026 at 6:58 am

    I think the best way is to make multiple targets in your project. The easiest way to do this is to click on your project file in the file list on the left side of XCode, right click on the object under “TARGETS” in the middle pane and select Duplicate. Then you can include A and C in one target, and B and C in another. You can compile them separately, and its basically like having two projects except they share common files. Does this sound like what you want?

    EDIT On second thought, it doesn’t sound like it. Your problem is happening when you compile to a library, and then link another project to it, right?

    It doesn’t seem like there is a way to have weakly linked objects inside of a compiled library. You will probably be better off splitting them into separate libraries (which is sort of what happened in the scenario described at the bottom of this page)

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
We're building an app, our first using Rails 3, and we're having to build
I'm trying to select an H1 element which is the second-child in its group
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

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.