Clangd VSCodium can't find GTK-4 headers

50 Views Asked by At

I'm looking to learn how to use the GTK-4 library in C, so I've installed the official packages for my distribution (Manjaro), but I'm facing an issue... Clangd can't find the gtk headers with #include <gtk/gtk.h> because in my /usr/include/ directory, I have versions 2, 3, and 4 of gtk... After doing some research, I found that during compilation, it's sufficient to use the parameters provided by pkg-config --cflags gtk4 and pkg-config --libs gtk4 for everything to proceed correctly...

Unfortunately, I haven't found out how to configure clangd so that the autocompletion in my IDE (VSCodium) works with these libraries... At the moment, since nothing seems to be defined for the editor, I get dozens of errors that render autocompletion completely unusable even though there are no errors during compilation...

I've tried using compile_flags.txt and compile_commands.json, I've tried configuring clangd with .clangd, but nothing has worked...

Does anyone have a solution?

(Sorry if my English is bad, I used an online translator from my native language...)

0

There are 0 best solutions below