New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clangd still cannot find header files after specifying the include options #393
Comments
Usually using With this manual approach, I would guess the issue has something to do with the format of the path (e.g. spaces in the path, backslashes, use of quotes, etc. -- getting this stuff right can be tricky, especially on Windows). If you share clangd logs I may be able to offer a more specific diagnosis. |
I tried the query driver option and put the verbose log option. The query driver did not work. Here is the log from when I restarted the language server and clicked on a file. |
A couple of reasons
|
Even with the compile_commands, it still doesn't work. I also fixed This is my compile_commands.json
|
Hmm, I don't think you can put I also wouldn't recommend writing the |
Yep, still no luck. I tried using compiledb, ran the |
Please show new clangd logs with the generated |
I did some testing in a VM so the directories have changed.
|
The logs are showing that:
There are diagnostics issued when you open
this can be fixed using https://clangd.llvm.org/faq#how-do-i-fix-errors-i-get-when-opening-headers-outside-of-my-project-directory. |
Thanks, it was fixed. I also had to add the compilers to my user path also. My question is, is there no other way to do it without a |
Once clangd/clangd#1089 is fixed, it should be enough to add:
to the clangd config file (and |
I am using Windows 11, and I have downloaded the gcc compiler from mingw-w64, which should include all the basic system headers, and I am using clangd for vscode.
For some reason, clangd still has a hard time trying to find all the basic header files, even when I specify multiple
-isystemC:\path\to\includes
. For example, clangd still fails to findbits/c++config.h
.I have made a
.clangd
file to specify the includes.Am I missing something?
Sorry if this is not the place to get help with clangd.
The text was updated successfully, but these errors were encountered: