macOS C++ CMake project cannot find any C++ header file so clangd fails.
See original GitHub issuePlease describe the problem. For hints on what information is helpful, see: https://clangd.llvm.org/troubleshooting.html
If you can, provide a minimal chunk of code that shows the problem (either inline, or attach it if larger).
C++ file where #Include <memory> or really any standard C++ file is included. None of the includes will resolve.
Logs
Please attach the clangd log from the “Output” window if you can.
If possible, run with --log=verbose
- note that the logs will include the contents of open files!
clangd.log
System information Clangd version : 11.0.0 clangd extension version: 0.1.11 Operating system:macOS 10.15
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
clang-tidy can't locate stdlib headers - Stack Overflow
I add arg "--query-driver=/usr/bin/clang++" to clangd, and it works fine now, the headers can be found now. C++ headers should be in folder...
Read more >Clangd does not recognize basic headers (cpp file) · Issue #556
coc-clangd doesn't recognize basic headers (I only use it for C++, don't know about C), such as string and iostream.
Read more >Clang linking error MacOS Big Sur | Apple Developer Forums
Hi All, I am trying to build my helloworld.cpp, but I am having problem since I updated to Big Sur. Below a verbose...
Read more >CMAKE_EXPORT_COMPILE_C...
When using a g++ compiler for build, the clang-tidy program does not find the c++ header.
Read more >System headers - What is clangd?
You should first try executing the command from CDB to see if it can compile your file. If it can't, it means you...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think this should be the default setting on macos, it was a pain to find this.
Hey, if someone ends on this issue like me I found this snippet from the installation page very useful! It helps generating a
compile_commands.json
thatclangd
will use to find your project’s deps 😉