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 6531083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:50:06+00:00 2026-05-25T09:50:06+00:00

I have a project that includes a shared library as source files. Some of

  • 0

I have a project that includes a shared library as source files.
Some of the library classes need the include of some Frameworks (like the known Apple Reachability).
Those Frameworks are not included into the project because I don’t use the classes / methods that needs them.
I have a MyStandardLib.h that references all the library headers, and that is included in the.pch on my app.

But…

When building my app, the linker generates link error for those objects I don’t use/call in the app So they should logicaly not be linked.

enter image description here

As an example, if I remove from the project the incriminated classes and Frameworks, everything works fine.

If I add the needed Frameworks :

  • It’s crazy to do that for each project because of classes I won’t use
  • It increases my app file size for nothing useful (26 Ko -> 1.2 Mo)

How can I avoid those linker error, and avoid links that should not happen :

  • keeping my library as is in the project (I don’t want a precompiled library)
  • Not needing to include all those useless Frameworks until I really need them
  • 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-05-25T09:50:06+00:00Added an answer on May 25, 2026 at 9:50 am

    The reason for those errors are clearly because the frameworks you are including in your project do require those other frameworks (from what you could provide they use: Reachability, the CFNetwork Framework and the CoreLocation Framework)

    What is happening is that when the compile links your objects (in the compiler sense of it) it is also looking for objects ‘mentioned’ in your added frameworks and it is not finding them because they have not been included to your projects.

    If you use a Framework A that is linked with Framework B then if you application C uses framework A it also needs framework B because frameworks are not exactly self contained.

    If your code compile without those frameworks and your application needs to take low space simply remove them from your Build Phase and you’ll be good to go.

    However, if it doesn’t compile without those frameworks you will have no choice but to include them in your project and, therefore, increasing even more the final space required by your application.

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

Sidebar

Related Questions

I have a very old project that includes the source from another project directly,
i have written a library with some classes that make use of qt object
I have a directory of source files (.h and .m) that are shared between
I have a project that includes a copy of phpMyAdmin. I do development locally
I have a project that has the following line in the additional includes section:
I have a visual studio 2008 solution that includes an asp.net-hosted remoting project in
I have a .DLL that i include in my Visual Studio 2008 project. The
I have a project that I would like to start beta testing soon, it
I have a class library that is shared between multiple Role projects in my
I have a C# Solution that includes several websites. Those websites have some communal

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.