Alternative to manually adding -I..library paths for every folder to tasks.json for the rest of my life?

222 Views Asked by At

In VS Code trying to use gtkmm and finding myself in a never ending loop of compile, find location of header file that wasn't found, then adding the library path to task.json args.

Is this going to consume the rest of my days, or is there a better way? Using folder/** doesn't seem to enable recursive search of subdirectories.

1

There are 1 best solutions below

0
On

Using

`pkg-config gtkmm-3.0 --cflags --libs`

in the args section of tasks.json, or directly into the g++ command line call as shown here, inserts the required -I flags into the argument.

As in

"args": [
                "-fdiagnostics-color=always",
                "`pkg-config gtkmm-3.0 --cflags --libs`",