-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed as not planned
Labels
Language Servicemore info neededThe issue report is not actionable in its current stateThe issue report is not actionable in its current state
Description
Environment
- OS and Version: OS version: Windows_NT x64 10.0.19044
- VS Code Version: VS Code version: Code 1.78.2 (microsoft/vscode@b3e4e68, 2023-05-10T14:39:26.248Z)
- C/C++ Extension Version: cpptools-extension-pack 1.3.0
- If using SSH remote, specify OS of remote machine:
Bug Summary and Steps to Reproduce
Bug Summary:
I am getting the following errors in VSCode on Windows using MSYS2/clang64 compiler:
#include errors detected. Consider updating your compile_commands.json or includePath. IntelliSense features for this translation unit (D:\xxx\xxx.cpp) will be provided by the Tag Parser.C/C++(1696)
and
cannot open source file "cstddef" (dependency of "D:\xxx\gtest\gtest.h")C/C++(1696) when using MSYS2 clang64 environment.
Additionally cstlib, iostream, ... aren't found as well.
Using MSYS2 mingw64 (clang or gcc) everything is working.
Part of my cmake-kits.json
{
"name": "MSYS2 clang64",
"compilers": {
"C": "C:\\msys64\\clang64\\bin\\clang.exe",
"CXX": "C:\\msys64\\clang64\\bin\\clang++.exe"
},
"environmentVariables": {
"CMT_MINGW_PATH": "C:\\msys64\\clang64\\bin"
}
Steps to reproduce:
Here a test code can be found which reproduces the behavior when compiling.
Expected behavior:
All the includes should be found.
Configuration and Logs
Logs:
-------- Diagnostics - 6/12/2023, 6:43:33 AM
Version: 1.15.4
Current Configuration:
{
"name": "Win32",
"includePath": [
"d:\\VSCode_test/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"compilerPath": "C:\\msys64\\mingw64\\bin\\gcc.exe",
"cStandard": "gnu17",
"cppStandard": "gnu++17",
"intelliSenseMode": "windows-gcc-x64",
"configurationProvider": "ms-vscode.cmake-tools",
"compileCommands": "d:\\VSCode_test/${variant:buildType}/compile_commands.json",
"compilerPathIsExplicit": true,
"cStandardIsExplicit": true,
"cppStandardIsExplicit": true,
"intelliSenseModeIsExplicit": true,
"compilerPathInCppPropertiesJson": "C:\\msys64\\mingw64\\bin\\gcc.exe",
"compileCommandsInCppPropertiesJson": "${config:cmake.buildDirectory}/compile_commands.json",
"configurationProviderInCppPropertiesJson": "ms-vscode.cmake-tools",
"mergeConfigurations": false,
"browse": {
"path": [
"${workspaceFolder}/**"
],
"limitSymbolsToIncludedHeaders": true
}
}
Custom browse configuration:
{
"browsePath": [
"d:/vscode_test/src"
],
"compilerPath": "c:/msys64/clang64/bin/clang++.exe",
"compilerArgs": [],
"compilerFragments": [
"-fms-extensions -Wno-address-of-temporary -g -std=gnu++17",
"-DDUMMY",
"-std=c++17",
"-pthread",
"-fpermissive"
]
}
Custom configurations:
[ D:\VSCode_test\src\main.cpp ]
{
"includePath": [
"d:/vscode_test/src"
],
"defines": [],
"compilerPath": "c:/msys64/clang64/bin/clang++.exe",
"compilerArgs": [],
"compilerFragments": [
"-fms-extensions -Wno-address-of-temporary -g -std=gnu++17",
"-DDUMMY",
"-std=c++17",
"-pthread",
"-fpermissive"
]
}
Translation Unit Mappings:
[ D:\VSCode_test\src\main.cpp ]:
D:\VSCode_test\src\main.cpp
Translation Unit Configurations:
[ D:\VSCode_test\src\main.cpp ]:
Process ID: 19832
Memory Usage: 50 MB
Compiler Path: C:\msys64\clang64\bin\clang++.exe
Includes:
D:\VSCode_test\src
C:\msys64\clang64\lib\clang\16\include
C:\msys64\mingw64\include
Defines:
DUMMY
Standard Version: c++17
IntelliSense Mode: windows-clang-x64
Other Flags:
--clang
--clang_version=160004
--ms_extensions
Total Memory Usage: 50 MB
Browse Paths from compile_commands.json, from workspace folder: D:\VSCode_test
D:\VSCode_test\src
------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 9095Other Extensions
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
Language Servicemore info neededThe issue report is not actionable in its current stateThe issue report is not actionable in its current state