CppPilot

MSVC build errors > C1083

C1083: cannot open include file

fatal error C1083: Cannot open include file: 'json.hpp': No such file or directory

The compiler did not find the header named by an #include in any directory it searched.

Causes and fixes

  1. Its folder is not an include directory. Add it to C/C++ > General > Additional Include Directories, relative to the project with $(ProjectDir) or $(SolutionDir) rather than as an absolute path.
  2. It is set for another configuration or platform. Settings made for Debug or Win32 only do not apply to Release or x64: select All Configurations and All Platforms when you add the directory.
  3. Quotes and angle brackets search differently. #include "file.h" looks first next to the including file; <file.h> only in the include directories.
  4. The path in the directive is wrong. Check the folder names in #include "lib/file.h" against the directory you added.
  5. A dependency or an SDK is not installed. For Windows or standard headers, install the Windows SDK or the C++ workload in the Visual Studio Installer; for a library, restore it, for example with vcpkg.

Fix C1083 with CppPilot

CppPilot reads the error, your code, and the project settings Visual Studio evaluates for the active configuration, then explains which of these causes applies. Choose Fix and the AI corrects it; CppPilot rebuilds the project and checks that the error is gone. Every change appears in Visual Studio for your approval.

Let the AI fix it in Visual Studio

CppPilot is a free extension that explains and fixes MSVC build errors with Codex, Claude, or CppPilot Cloud.

Get CppPilot free Get started

Related errors: C2065, LNK1104, MSB8036. See all guides.