Where does Visual Studio look for C++ header files?

Visual Studio looks for headers in this order:

  • In the current source directory.
  • In the Additional Include Directories in the project properties (Project -> [project name] Properties, under C/C++ | General).
  • In the Visual Studio C++ Include directories under ToolsOptionsProjects and SolutionsVC++ Directories.
  • In new versions of Visual Studio (2015+) the above option is deprecated and a list of default include directories is available at Project PropertiesConfigurationVC++ Directories

In your case, add the directory that the header is to the project properties (Project PropertiesConfigurationC/C++GeneralAdditional Include Directories).

Leave a Comment