clangd / vscode-clangd

Visual Studio Code extension for clangd
https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd
MIT License
629 stars 106 forks source link

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

Open koechg2022 opened 3 months ago

koechg2022 commented 3 months ago

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_collectionname#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
HighCommander4 commented 3 months ago

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.