vscode-clangd icon indicating copy to clipboard operation
vscode-clangd copied to clipboard

Can’t find includes my header file

Open wotterfree opened this issue 3 years ago • 3 comments

I am new to C++, I used clangd in vscode for the first time, but I encountered some troubles, mainly because of some problems with file references. I read "troubleshooting", and it suggested that compile_commands.json needs to be set, but I don't know how to set it? ask for help

Logs image

image

System information

Homebrew clang version 14.0.6 Target: arm64-apple-darwin21.5.0 Thread model: posix InstalledDir: /opt/homebrew/opt/llvm/bin

wotterfree avatar Jul 22 '22 15:07 wotterfree

compile_commands.json is a file that you need to create. See https://clangd.llvm.org/installation#project-setup for some common ways to do it.

HighCommander4 avatar Jul 22 '22 20:07 HighCommander4