Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22014

cannot open source file "glibconfig.h" (dependency of "gtk/gtk.h") in Studio Code

$
0
0

I've configured the task json in Visual Studio Code

{"tasks": [        {"type": "shell","label": "gcc build active file","command": "/usr/lib64/ccache/gcc","args": ["-g","${file}","-o","${fileDirname}/${fileBasenameNoExtension}","`pkg-config", "--cflags", "--libs","gtk+-3.0`"            ],"options": {"cwd": "/usr/lib64/ccache"            },"problemMatcher": [],"group": {"kind": "build","isDefault": true            }        }    ],"version": "2.0.0"}

And I think the terminal output is ok,it builds without issues:

> Executing task: /usr/lib64/ccache/gcc -g /home/giuliohome/dev/gnome/gtk-example/gtk_hello02.c -o /home/giuliohome/dev/gnome/gtk-example/gtk_hello02 `pkg-config --cflags --libs gtk+-3.0` <

For a strange reason, that I don't deeply understand, the Visual Studio Code editor needs a different, separate configuration in .vscode/c_cpp_properties.json and it still complains with squiggles under the #include <gtk/gtk.h>

Message of the problem explains:

cannot open source file "glibconfig.h" (dependency of "gtk/gtk.h")

What I've tried to do was already adding 3 dirs by visual inspection of my /usr/inlcude structure

but (since it contains a lot of file and subfolders) I'm perplexed by this way to proceed (I'm I supposed to keep searching all those nested include dependencies?) and anyway I don't know what to add next...

{"configurations": [        {"name": "Linux","includePath": ["${workspaceFolder}/**","/usr/include/linux","/usr/include/gtk-3.0","/usr/include/glib-2.0"            ],"defines": [],"compilerPath": "/usr/lib64/ccache/gcc","cStandard": "c11","cppStandard": "gnu++14","intelliSenseMode": "clang-x64"        }    ],"version": 4}

Viewing all articles
Browse latest Browse all 22014

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>