kunzaZa183's blog

By kunzaZa183, history, 3 hours ago, In English

Hi everyone,

I'm a big fan of Visual Studio Code. However, I'm not a big fan of the C/C++ intellisense provided by Microsoft. Although I am aware it works on other machines; on my machine, it is a slow and buggy extension that seems to hallucinate more often than not, which led me to switch to clangd as my primary C/C++ autocomplete extension. I've been using clangd for quite a while and I like it. One annoying thing I want to fix though, is the lack of inclusion of headers that are provided by GCC.

Headers like bits/stdc++.h, ext/pb_ds aren't supported by clang, but I would like to know how I could be able to use these headers with clangd on vscode. I remember that during IOI2024, the clangd extension provided by the host allowed me to use these headers, so I know that it is possible.

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
3 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by kunzaZa183 (previous revision, new revision, compare).

»
76 minutes ago, # |
  Vote: I like it 0 Vote: I do not like it

I did someting similar for my non vscode setup. My understanding is that clangd uses a clang/clang++ binary to parse and understand code. After you find that binary you can try "/your/clang/location/clang++ -v foo.cpp" to figure out the exact include paths of clang++. Once you find those paths you should manually add the headers you want to use.