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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:25:13+00:00 2026-06-04T01:25:13+00:00

I have a solution in Visual Studio 2010, containing two projects: A static library

  • 0

I have a solution in Visual Studio 2010, containing two projects:

  • A static library
  • An application linking with the same library

I’m developing them side by side. Eventually I’m going to make a second application which will share some code used by the first one, hence the library.

My problem is that whenever I modify the header file in my library (only got one so far), my first rebuild of the solution gives C1083: Cannot open source file: ‘mylibrary.lib’: No such file or directory.

Hitting build again a second time, immediately after, it finds the library and links just fine. So basically, any time I’ve modified the library and wish to rebuild, I have to do it twice in a row. I’ve checked that the .lib file gets placed in the right directory after the first rebuild, but the application’s build still fails to find it.

I have added the library as a reference under “Framework and References” in the project properties. I’m building the entire solution and VS clearly understands that it should build the two projects in the proper order, but I still get the problem described.

Any ideas how I might fix this?

  • 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-04T01:25:15+00:00Added an answer on June 4, 2026 at 1:25 am

    When adding a library as a reference, VS can link to the library file automatically (the setting is under Framework and References, [your reference], Link Library Dependencies) , and this seems to be enabled by default. If you add the .lib file to your linker options at this point, it seems to cause the problem I described.

    Removing the file as a linker option makes it work correctly on the first build.

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

Sidebar

Related Questions

I have a solution in Visual Studio 2010 containing 6 projects (1 web application,
I'm using Visual Studio 2010, and I have a solution containing 2 C++ static
I have a Visual Studio 2010 solution containing several C# projects, with Resharper 5.1
I have a Visual Studio Solution (2010) containing code projects that were under source
I have a solution with many projects. In Visual Studio 2010, clicking properties for
I have a Visual Studio 2010 solution that contains multiple projects. One of these
I have a Visual Studio 2010 solution and two files have mysteriously appeared in
I have a Visual Studio 2010 solution with 8 projects. It also has a
I have a Visual Studio 2010 solution with 3 projects. The first is an
I have a Visual Studio 2010 MVC 3 web solution containing a number of

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.