Search code examples
c++cvisual-studioheader-filesinclude-path

Esay way to include all header files from solutions explorer Visual Studio 2019


I want include all header files from solutions explorer like this:

enter image description here

without add all directories with this option:

enter image description here

Is there an easy way to tell VS2019 to use and link all header files from solutions explorer automatically?

Why? If I have a lot of source code directories and in each directory are the header files... I need to add each directory manually.

Other simple Example: enter image description here The directory structure it this one: enter image description here And I need to add #include "test2.h" in "test1.c" and in this case VS cant find the header file. So the header "test2.h" is NOT where the test1.c is. Why VS dont find the header automatically by solutions explorer?


Solution

  • Ok. There is no solution.

    Possible alternatives:

    1. All headers are in one place and one include path is required.
    2. Or headers in the same directory like the source code files.
    3. Or headers need to be include like #include "../../header.h"

    Thanks.