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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:52:15+00:00 2026-05-27T23:52:15+00:00

Situation: I’m building a library with VS2010, and it has a dependency on LibraryA.

  • 0

Situation:

I’m building a library with VS2010, and it has a dependency on LibraryA. I am only using one of many features that LibraryA offers, so I want to link it in statically.

Everything I’m reading about this tells me to set the whole project to link statically against MFC, which is something I don’t want to do. I’m just fine with my library dynamically linking against windows DLLs; I just want to statically link against LibraryA only.

Fooling around with the options windows, I don’t seem to see such an option. Is it really all or nothing?

Thanks,
-Ben

  • 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-27T23:52:17+00:00Added an answer on May 27, 2026 at 11:52 pm

    Answering my own question here:

    All you need to do to statically link a library in VS is:

    1) Add the .lib file to the list found in properties -> linker -> input : Additional Dependencies.

    2) Add the directory that the .lib file is located at to the properties -> linker -> general : Additional Library Directories.

    If the .lib file is a statically linked library, then that is all you have to do.

    The main reason I was confused was that a .lib file could also be a companion file alongside a dll, and not a static library itself.

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

Sidebar

Related Questions

Situation I run a build system that executes many builds for many project. To
Situation: I have many gzipped input files that I want to process in a
Situation: using stsadm -o enumallwebs -includewebparts returns list of webpart. One of which I
Situation: I have a simple XML document that contains image information. I need to
Situation: text: a string R: a regex that matches part of the string. This
Situation: Table TBL has ~10k entries for deletion, Table TBL has 14 child tables
Situation with Thai text on a client site is that we can't control where
Situation: I am trying to write a efficient query using "LIKE" statement to look
Situation: I am writing a program in C that maintains a number of threads.
Situation: I send an ajax request that returns HTML containing elements needing event handlers

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.