-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Environment
- OS and Version: Win 10 64bit 19045
- VS Code Version: 1.89.1
- C/C++ Extension Version: 1.20.5
Bug Summary and Steps to Reproduce
Bug Summary:
When updating to version 1.20.5, intellisense no longer finds system headers (eg, the entire standard library, windows.h, gl/GL.h). The project still builds correctly, but every system header is flagged as an error. Browse functionality to those headers is similarly broken.
Even manually specifying those paths with C_Cpp.default.includePath does not work.
This did work in 1.19.9, and does again after a rollback. Testing a re-upgrade to 1.20.5 breaks again. Clean/etc does not help.
This occurs with multiple cmake-based projects. Nothing relating to cmake or its extensions have updated recently, and I am unaware of a setting to change to affect this.
Steps to reproduce:
- Open a C++ project that includes any standard library header, using v1.19.9. Note that intellisense and browse work.
- Upgrade the extension to 1.20.5, reload extensions.
- Note that every standard library or system header is now unable to found, breaking all intellisense and browse functionality.
Expected behavior:
Intellisense and browse would be able to find system libraries that are used during compile, and not flag them as errors.
Configuration and Logs
Note that this c_cpp_properties.json was generated specifically for this question; I usually don't have one in the workspace. Whether it is present or absent does not affect this issue.
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${default}"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"configurationProvider": "ms-vscode.cmake-tools"
}
],
"version": 4
}
There is no "C/C++: Log Diagnostics" command; there is one for cmake. That provides:
{
"os": "win32",
"vscodeVersion": "1.89.1",
"cmtVersion": "1.17.17",
"configurations": [
{
"folder": "f:\\Dev\\Projects\\ochre",
"cmakeVersion": "3.21.4",
"configured": true,
"generator": "Ninja",
"usesPresets": false,
"compilers": {
"C": "F:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe",
"CXX": "F:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe"
}
}
],
"cpptoolsIntegration": {
"isReady": true,
"hasCodeModel": true,
"activeBuildType": "Debug",
"buildTypesSeen": [
"Debug"
],
"requests": [
"file:///f%3A/Dev/Projects/ochre/src/main.cpp"
],
"responses": [
{
"uri": "file:///f%3A/Dev/Projects/ochre/src/main.cpp",
"configuration": {
"includePath": [
"f:/dev/projects/ochre/src",
"f:/dev/projects/ochre/src/gl",
"f:/dev/projects/ochre/build/debug/game/gen",
"f:/dev/projects/ochre/external/glfw/include",
"f:/dev/projects/ochre/external/spdlog/include",
"f:/dev/projects/ochre/external/glm",
"f:/dev/projects/ochre/external/stb"
],
"defines": [
"SPDLOG_COMPILED_LIB",
"SPDLOG_DISABLE_DEFAULT_LOGGER",
"SPDLOG_NO_ATOMIC_LEVELS",
"UNICODE",
"_UNICODE"
],
"compilerPath": "f:/program files/microsoft visual studio/2022/community/vc/tools/msvc/14.39.33519/bin/hostx64/x64/cl.exe",
"compilerArgs": [],
"compilerFragments": [
"/DWIN32 /D_WINDOWS /EHsc /MP /Zi /Ob0 /Od /RTC1 -MDd",
"/Wall",
"/wd4061",
"/wd4100",
"/wd5045",
"/wd5264",
"/wd4710",
"/wd4711",
"/wd26812",
"/external:anglebrackets",
"/external:W0",
"/arch:AVX",
"/fp:fast",
"/Zc:__cplusplus",
"/permissive-",
"/Zc:inline",
"/Zc:preprocessor",
"/GR-",
"-std:c++17",
"/YuF:/Dev/Projects/ochre/build/Debug/game/CMakeFiles/ochre.dir/cmake_pch.hxx /FpF:/Dev/Projects/ochre/build/Debug/game/CMakeFiles/ochre.dir/./cmake_pch.cxx.pch /FIF:/Dev/Projects/ochre/build/Debug/game/CMakeFiles/ochre.dir/cmake_pch.hxx"
]
}
}
],
"partialMatches": [],
"targetCount": 4,
"executablesCount": 1,
"librariesCount": 2,
"targets": [
{
"name": "ochre",
"type": "EXECUTABLE"
},
{
"name": "glfw",
"type": "STATIC_LIBRARY"
},
{
"name": "update_mappings",
"type": "UTILITY"
},
{
"name": "spdlog",
"type": "STATIC_LIBRARY"
}
]
},
"settings": [
{
"communicationMode": "automatic",
"useCMakePresets": "auto",
"configureOnOpen": true
}
]
}
Other Extensions
The extension pack v1.3.0:
- C/C++ Themes v2.2.0
- CMake v0.0.17
- CMakeTools v1.17.17
Additional context
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status