microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.94k stars 29.52k forks source link

C++ standard headers #209766

Closed slrodini closed 7 months ago

slrodini commented 7 months ago

Type: Bug

In any cpp source file include a standard header (for instance cmath). An error in the inclusion statement reads: "cannot open source file "math.h" (dependency of "cmath"). Please run the 'Select IntelliSense Configuration...' command to locate your system headers." Running the command prompts to select the compiler, and the correct list of installed compilers is found here. Select for instance g++-11. The error is still there. If I open the cmath file that IntelliSense detect there is an error highlighted in the commented section of the documentation of the file(!). In the c_cpp_properties.json I have the include path for the headers "includePath": [ "${workspaceFolder}/", "/usr/include/c++/11/", "/usr/include/x86_64-linux-gnu/c++/11/**" ], but it does not help.

VS Code version: Code 1.88.0 (5c3e652f63e798a5ac2f31ffd0d863669328dc4c, 2024-04-03T13:26:18.741Z) OS version: Windows_NT x64 10.0.22631 Modes: Remote OS version: Linux x64 5.15.146.1-microsoft-standard-WSL2

System Info |Item|Value| |---|---| |CPUs|AMD Ryzen 9 5950X 16-Core Processor (32 x 3394)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|63.92GB (47.41GB free)| |Process Argv|--folder-uri=vscode-remote://wsl+Ubuntu/mnt/d/Documents/Code/NangaParbat-Beta --remote=wsl+Ubuntu --crash-reporter-id 5347c76c-2b46-4852-bf71-1b26540c3451| |Screen Reader|no| |VM|0%| |Item|Value| |---|---| |Remote|WSL: Ubuntu| |OS|Linux x64 5.15.146.1-microsoft-standard-WSL2| |CPUs|AMD Ryzen 9 5950X 16-Core Processor (32 x 3393)| |Memory (System)|31.30GB (28.96GB free)| |VM|0%|
Extensions (27) Extension|Author (truncated)|Version ---|---|--- brainfuck-syntax|att|0.0.1 language-gas-x86|bas|0.0.2 better-cpp-syntax|jef|1.17.2 vscode-peacock|joh|4.2.2 gnuplot|mam|1.0.5 jupyter-keymap|ms-|1.1.2 remote-containers|ms-|0.354.0 remote-ssh|ms-|0.110.1 remote-ssh-edit|ms-|0.86.0 remote-wsl|ms-|0.88.0 remote-explorer|ms-|0.4.3 vscode-todo-highlight|way|1.0.5 githistory|don|0.6.20 gitlens|eam|14.9.0 shell-format|fox|7.2.5 black-formatter|ms-|2024.2.0 debugpy|ms-|2024.4.0 python|ms-|2024.4.0 vscode-pylance|ms-|2024.4.1 cmake-tools|ms-|1.17.17 cpptools|ms-|1.20.0 cpptools-extension-pack|ms-|1.3.0 indent-rainbow|ode|8.3.1 code-spell-checker|str|3.0.1 cmake|twx|0.0.17 clang-format|xav|1.9.0 markdown-pdf|yza|1.5.0 (5 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vstes627:30244334 vscorecescf:30445987 vscod805cf:30301675 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:30899288 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 h48ei257:31000450 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 d34g3935:30971562 fegfb526:30981948 bg6jg535:30979843 ccp2r3:30993541 dsvsc020:30976470 pythonait:31006305 gee8j676:31009558 dsvsc021:30996838 g1icg217:30999571 ```
starball5 commented 7 months ago

this should be moved to the cpptools issue tracker.

deepak1556 commented 7 months ago

Please reopen the issue at https://github.com/microsoft/vscode-cpptools