-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
include error issue #13322
Comments
Hi @namanagrawal007 . I'm not able reproduce this with a simple example. Could you set the setting |
Hi, I enabled loggingLevel: Debug Additionally, my current C/C++ related settings in settings.json are: {
"C_Cpp.default.compilerPath": "C:\\msys64\\ucrt64\\bin\\gcc.exe",
"C_Cpp.default.intelliSenseMode": "${default}",
"C_Cpp.default.includePath": [
"${workspaceFolder}/**"
],
"C_Cpp.loggingLevel": "Debug"
} |
Title:
📌 #include errors in C++ despite correct settings in VS Code (MSYS2 GCC)
Description:
I am experiencing persistent #include errors in VS Code with the C/C++ extension, even though my code compiles fine. IntelliSense is failing to detect standard headers, and squiggles appear under #include and other system headers.
VS Code Info:
VS Code Version: 1.97.2 (User Setup)
C/C++ Extension Version: 1.23.6
OS: Windows 11 Home Single Language (Version 24H2)
Compiler: MSYS2 GCC (C:\msys64\ucrt64\bin\gcc.exe -v output below)
Error Message:
#include errors detected. Please update your includePath.
Steps to Reproduce:
Open a C++ file in VS Code.
Add #include (or any standard library).
The editor shows an #include error, even though the file compiles fine.
What I Have Tried (None Worked):
✅ Installed/Reinstalled the C/C++ Extension
✅ Verified compilerPath in c_cpp_properties.json
✅ Manually added includePath for MSYS2 GCC
✅ Used "C_Cpp.default.includePath" in VS Code Settings
✅ Reset IntelliSense Cache (C/C++: Reset IntelliSense Database)
✅ Ran Extension Bisect (No conflicting extensions found)
✅ Fully reinstalled VS Code and deleted Code folder in AppData
✅ Issue persists with older versions of the C/C++ extension
Expected Behavior:
VS Code should correctly detect #include paths for IntelliSense without showing errors.
Configuration and Logs
Other Extensions
i have installed only two extensions
Additional context
Running gcc.exe -v confirms that the include paths exist.
Downgrading to older versions of the C/C++ extension (e.g., 1.23.4, 1.23.3) does not resolve the issue.
The text was updated successfully, but these errors were encountered: