clangd/vscode-clangd

wxWidgets is not recognized, no matter how much I edit the c_cpp_properties.json file

Opened this issue · 1 comments

Note: we mostly implement features in the clangd language server, and rely on Microsoft's LSP client framework to expose these in VSCode. Features requiring a lot of VSCode-specific work are unlikely to be implemented.

I am trying to use wxwidgets in my program, and in a header file, I'm trying to include wx/wx.h, which is installed on my machine, and the code is able to compile and run when I compile and run the code from the command line. But this keeps appearing as an error. Could you get clangd to recognize wxwidgets please?

Here's a picture of the error as it appears:

In the Problems tab:

[{
"resource": "/Users/geoffreykoech/Desktop/Personal Projects/Tic Tac Toe/headers/headers.h",
"owner": "generated_diagnostic_collection_name#4",
"code": "pp_file_not_found",
"severity": 8,
"message": "'wx/wx.h' file not found",
"source": "clang",
"startLineNumber": 2,
"startColumn": 10,
"endLineNumber": 2,
"endColumn": 19
}]

And an image of the error:

image

Please read through and follow the steps in https://clangd.llvm.org/installation#project-setup.

Please note also that c_cpp_properties.json is a configuration file specific to Microsoft's C/C++ extension. It's not used by clangd.