0

I've installed clangd through mason, the lsp works when I open a cpp file. It finds includes from the C std library but when I include for instance it will just say 'fstream' file not found, same goes for 'ostream' (which is included in a library I'd like to use'.

I'm using a PopOs distro and neovim is at version 0.9.1 any help would be greatly appreciated!

I don't know if this is relevant, but I compiled a starter program using g++ using the library that includes ostream, and the program compiled without a hitch. So I'm hoping I just have to add an include path setting or install the clang version of the stdlib but so far I haven't had any luck with those.

3
  • 1
    How do you include fstream: #include <fstream> vs. #include "fstream"? What is the symptom that made you believe the include is not accepted? Dec 21, 2023 at 14:38
  • Tried this clangd.llvm.org/… ?
    – Friedrich
    Dec 21, 2023 at 15:58
  • 1
    Showing how you build your library may also be important. Does this also occur if you run clangd outside of Vim? In fact, I think this is actually a clang question and should be asked on Stack Overflow.
    – Friedrich
    Dec 21, 2023 at 21:37

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.