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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:42:34+00:00 2026-06-10T22:42:34+00:00

I am working on a very large project that has several Visual Studio projects.

  • 0

I am working on a very large project that has several Visual Studio projects. These projects are built as static libraries and included in the Main project, let’s call it Main.exe.

I have created a new project and built it as a static library, let’s call it MyProj.lib. This library is dependent upon another static library, let’s call it API.lib.

Now, I need to link my project to the Main project. Currently I have both of the static libraries linked to the Main project. I previously asked this question: Link static library in another static library and found out that I can’t nest the static libraries. Paul Michalik pointed out that I need to simply link the two libraries independently when I build the Main project.

I now get several LNK2019 errors from the MyProj.lib library, saying that it can’t find the symbols that are defined in the API.lib library. Visual Studio knows where both of the library files are, so this is very confusing to me. Any ideas?

  • 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-10T22:42:36+00:00Added an answer on June 10, 2026 at 10:42 pm

    This kind of confusion stems from the mistaken believe that .lib files are somehow magical. That a linker could see that a .lib file has other dependencies. That is just not the case, a static .lib is just a bag of .obj files. A way to collect compiler output into a single file. Nothing more, nothing less.

    What is especially confusing about it is that when you build the library, it will never complain about missing dependencies. The explanation for that is simple, building a library does not run the linker. Just the lib.exe tool that collects the .obj files into a bag.

    It doesn’t come together until you actually run the linker to build the final executable. Now all the pieces have to come together, the linker has to also see the .obj or .lib file that contains the dependencies. It complains when it doesn’t.

    That’s a very weak link in the C/C++ build model, hard to fix. Vendors have tried to address this, Microsoft did too. They added the non-standard #pragma comment(lib, “something.lib”) feature to tell the linker that it needs to link “something.iib” without you explicitly specifying it in the linker’s Additional Dependencies setting. Very nice. Dealing with exactly where “something.lib” is stored is however a problem you need to deal with. Crud. Another setting.

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

Sidebar

Related Questions

I'm working on a very large project that has associated class files in multiple
I am working on a project that must store very large datasets and associated
I am working with a team that works on a very large software project,
I am working on a project that has a large database with all the
I have recently started working on a very large C++ project that, after completing
I am working on a project that deals with analyzing a very large amount
I'm working on a very large project with three phases of source code. Development
I'm working on a project which generates a very large number of sequential text
A project I have been working on for several years apparently has gotten so
I'm working on a project that involves parsing a large csv formatted file in

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.