C1083
Visual C++ Programming Language
Severity:What Does This Error Mean?
C1083 means the compiler looked for a header file and could not find it anywhere on the include path. The error names the file: C1083: Cannot open include file: 'filename.h': No such file or directory. Adding the directory that contains the header to Project Properties > C/C++ > General > Additional Include Directories fixes it.
Affected Models
- Visual Studio 2015–2022
- MSVC v14.x / v17.x
- MSBuild and command-line builds
Common Causes
- The directory containing the header is not on the include search path
- A third-party library was not installed or its include path was not added to the project
- A typo in the #include filename or path
- Using angle brackets <file.h> for a project-local header instead of quotes "file.h"
- The SDK or Windows Kit include path is missing — common after a Visual Studio update
How to Fix It
-
Confirm the file exists on disk. Search your hard drive or the library's installation folder for the filename the error mentions.
If the file does not exist, the library is either not installed or was installed in an unexpected location. Reinstalling the SDK or library usually places the headers in the correct location.
-
Add the header's directory to the project. In Visual Studio: right-click the project > Properties > C/C++ > General > Additional Include Directories. Add the full path to the folder containing the header.
Example: if the header is at C:\libs\mylib\include\mylib.h, add C:\libs\mylib\include to Additional Include Directories.
-
Check whether you should use quotes or angle brackets. Use #include "myfile.h" for files in your own project. Use #include <system.h> for SDK and system headers.
Angle brackets search the system/SDK include paths first. Quotes search the current file's directory first, then the system paths. For project-local headers, quotes are almost always correct.
-
If the error appeared after installing a Visual Studio update, check that the Windows SDK path is still configured. Go to Tools > Get Tools and Features and verify the SDK component is installed.
Visual Studio updates occasionally change SDK installation paths. The VC++ Directories settings (Project Properties > VC++ Directories) may need to be reset to default inherited values.
Frequently Asked Questions
Why does C1083 say 'No such file or directory' when the file clearly exists?
The file exists on disk but the compiler does not know which directory to look in. C++ compilers do not search your entire hard drive — they only search the paths listed in the include path configuration. The fix is always to add the directory containing the file to Additional Include Directories.
Can C1083 cause a cascade of other errors?
Yes — a missing header means all the types, functions, and macros it declares are unknown. This typically causes many C2065 undeclared-identifier errors on every line that uses those declarations. Fix C1083 first and most other errors will disappear.