vim-lsp-settings
vim-lsp-settings copied to clipboard
clangd can not find STL headers on MacOS
I'm using MacOS Catalina and the latest version of vim-lsp. My problem is that STL headers don't seem to be found by clangd.
If I do a clangd --check=E[09:37:33.030] [pp_file_not_found] Line 12: 'memory' file not found
I'm using a very current version of clangd,
$ clangd --version
Homebrew clangd version 13.0.0
Features: mac+xpc
Platform: x86_64-apple-darwin19.6.0
I am using a compile_commands.json.
My problem sounds similar to the one described in https://github.com/mattn/vim-lsp-settings/issues/159 , but that's already resolved.
Probably, it's a problem of clangd.
https://github.com/clangd/clangd/issues/556
Perhaps it is a clangd problem, but that clangd ticket referred to is for Windows 10. Strangely though, the clangd on my Mac that's used by CLion doesn't exhibit this problem.
I found the solution to be:
CPLUS_INCLUDE_PATH=/Library/Developer/CommandLineTools/usr/include/c++/v1/