Search code examples
visual-studiovisual-c++

Set VC++ Directories for all projects


I have one Visual Studio Solution with multiple projects in it. Anytime I need to add new headers/libs to the project i need to go to properties of each project in VC++ Directories and set the path for include and lib.

Is there any easier way to do this? To modify the solution with proper path and all the projects in it inherit that?

Thanks


Solution

  • You can create a single text file such as includes.txt, with contents in this format:

    /I "folder1"
    /I "folder2"
    

    Then include the file in each project by setting Properties->configuration properties->C/C++->Command Line in the Additional Options section you add:

    @includes.txt