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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:55:28+00:00 2026-05-25T11:55:28+00:00

I have 3 projects A, B and C. A is universal and used by

  • 0

I have 3 projects A, B and C.
A is universal and used by B and eventually C.
B is a bit more special and up to now only used by C.

Now as I want A and B to be reused as much as possible I thought of both being static libraries.

So I link A and B to static libraries and C to an executable, but when I want to link C
it gives me some undefined reference errors on A functions. So I added the library A to the linker options to resolve this but it did not help.

So I thought: when I want to deploy B then I also will have to deploy A to be able to link. Is there a way to link the static library A into static library B so I do not have to deploy 2 files?

And if so, how do I achieve this with Eclipse CDT, because I cant find a place where to define additional targets for the archiver.

Addition

I am working under linux but the things should also work under windows. But mainly I need a solution for linux to keep going with the development.

EDIT

Right now I “solved” the problem by linking A and B into static libraries and then use the remaining *.o files to link them into the executable but I do not consider this as good.

  • 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-25T11:55:29+00:00Added an answer on May 25, 2026 at 11:55 am

    a static library cannot be linked with another static library. I think because a static library is not an executable code and so full linking process (mainly references resolution) is not done. It’s done only for dynamic libraries and executables.

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

Sidebar

Related Questions

I am getting a web host and i have projects with teammats. I thought
I have 3 projects in my solution that I want to deploy. Is there
I have several small projects I want to host on single virtual host using
I started with a Universal app project but have changed it to iPhone only
I have a universal app but this issue seems to only relate to the
I have projects that need to be build with a specific version of the
I'm running wamp on Vista (Apache v2.2.11) and have projects setup such that http://localhost/projectx
Some projects have properties have miscellaneous settings such as: AllowPayments, ShowSideBar, SectionTitle. Really things
Projects have many tasks and a task has a custom RESTful action called 'approve'.
C++ projects have a linker option to embed manifest to require UAC elevation (/MANIFESTUAC:level)

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.