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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T22:07:51+00:00 2026-05-28T22:07:51+00:00

Where should I place .h and .lib files so that I can just write

  • 0

Where should I place .h and .lib files so that I can just write #include <mylib.h> (or "mylib.h") and the compiler and linker will find them for all my c++ projects?

  • 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-28T22:07:52+00:00Added an answer on May 28, 2026 at 10:07 pm

    There is no one single place on the computer where you can put .h / .lib files and expect them to be included in all C++ projects. The directories which are searched for .h / .lib files is a completely configurable item. Hence there is no one true include directory.

    A potential option is changing the global MSBuild files for the machine. C++ projects inherit a portion of their settings from this file and it could be used to force down a set of includes to the vast majority of projects. However it’s a bit of a sledge hammer option and won’t be 100% effective. Any individual project can still override these defaults (or simply not use MSBuild).

    It is possible though to have a unified .h / .lib directory on your machine and then manually point every C++ project at that directory

    • Right click on the C++ project
    • Navigate to Configuratin Properties -> C/C++ -> Command Line
    • Add /I c:\path\to\unified\include
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Should be simple but I couldn't find the answer, I would like to place
I was just curious, why should we use reflection in the first place? //
Should you place the @Transactional in the DAO classes and/or their methods or is
In .NET should you place unit test projects in with the rest of the
This code should i place this code at bottom of body it's in conditional
I'm still quite new to CodeIgniter and I was wondering, where should I place
Should it always come after main css or place doesn't matter? For example: if
Is there a consensus about the best place to put Python unittests? Should the
I have read in many places that network connection in a j2me app should
I would like to have a the following structure of folders: Myproj\src Myproj\include Myproj\lib

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.