title: Pkg-config for VS Code?
body: <p>I was hoping to run GStreamer Hello World example in a Linux Virtualbox with VS Code.</p>
  <p>Gstreamer <a href="https://gstreamer.freedesktop.org/documentation/installing/on-linux.html?gi-language=c" rel="nofollow noreferrer">install directions here.</a><br />
  GStreamer <a href="https://gstreamer.freedesktop.org/documentation/tutorials/basic/hello-world.html?gi-language=c" rel="nofollow noreferrer">HelloWorld info here.</a></p>
  <p>The manual C build/compile command is <code>$ gcc basic-tutorial-1.c -o basic-tutorial-1 'pkg-config --cflags --libs gstreamer-1.0'</code>  Works great that way. But, I was hoping to use Visual Studio Code, and I'm trying to push the <em>'pkg-config --cflags --libs gstreamer-1.0'</em> content into my launch.json file.  It's <a href="https://code.visualstudio.com/docs/cpp/launch-json-reference" rel="nofollow noreferrer">not clear</a> to me on how exactly to do that.</p>
  <p>I started with a launch.json file which I believe was created by the C/C++ plugin from Microsoft within VS Code.  I did not add a CMakeLists file.  There are no other extensions installed within VS Code.</p>
  <p>My current launch.json file: (test #17 or so...)</p>
  <pre><code>{
      &quot;version&quot;: &quot;0.2.0&quot;,
      &quot;configurations&quot;: [
          {
              &quot;name&quot;: &quot;gcc - Build and debug active file&quot;,
              &quot;type&quot;: &quot;cppdbg&quot;,
              &quot;request&quot;: &quot;launch&quot;,
              &quot;program&quot;: &quot;${fileDirname}/${fileBasenameNoExtension}&quot;,
              &quot;args&quot;: [],
              &quot;stopAtEntry&quot;: false,
              &quot;cwd&quot;: &quot;${workspaceFolder}&quot;,
              &quot;environment&quot;: [{ &quot;name&quot;: &quot;pkg-config&quot;, &quot;value&quot;: &quot; --cflags&quot;},{&quot;name&quot;: &quot;--libs&quot;, &quot;value&quot;:  &quot;gstreamer-1.0&quot;}],
              &quot;externalConsole&quot;: false,
              &quot;MIMode&quot;: &quot;gdb&quot;,
              &quot;setupCommands&quot;: [
                  {
                      &quot;description&quot;: &quot;Enable pretty-printing for gdb&quot;,
                      &quot;text&quot;: &quot;-enable-pretty-printing&quot;,
                      &quot;ignoreFailures&quot;: true
                  }
              ],
              &quot;preLaunchTask&quot;: &quot;C/C++: gcc build active file&quot;,
              &quot;miDebuggerPath&quot;: &quot;/usr/bin/gdb&quot;
          }
      ]
  }
  </code></pre>
  <p>The error I'm seeing?  <em>cannot open source file &quot;gst/gst.h&quot;</em>   I don't understand what launch.json is looking for.</p>
  <p>Edit/Comment:  Apparently this is not a new issue.</p>
  <ul>
  <li><a href="https://www.javaer101.com/en/article/37220391.html" rel="nofollow noreferrer">https://www.javaer101.com/en/article/37220391.html</a></li>
  <li>(<a href="https://stackoverflow.com/questions/58751821/how-to-configure-vscode-for-gtk3-for-intellisense-build-debug-and-g">How to configure VSCode for GTK3 for intellisense / build / debug and g++</a>)</li>
  <li><a href="https://stackoverflow.com/questions/66301156/vs-code-c-c-configuration-for-gtk-development">VS Code C/C++ configuration for GTK development</a></li>
  <li><a href="https://www.reddit.com/r/vscode/comments/joozcp/escaping_backticks_command_substitution/" rel="nofollow noreferrer">https://www.reddit.com/r/vscode/comments/joozcp/escaping_backticks_command_substitution/</a></li>
  <li><a href="https://www.reddit.com/r/vscode/comments/m66kpr/how_to_add_pkgconfig_compiler_arguments_to_vscode/" rel="nofollow noreferrer">https://www.reddit.com/r/vscode/comments/m66kpr/how_to_add_pkgconfig_compiler_arguments_to_vscode/</a></li>
  <li><a href="https://stackoverflow.com/questions/44576801/how-to-use-pkg-config-gtkmm-3-0-cflags-libs-in-the-visual-studio-code">How to use `pkg-config gtkmm-3.0 --cflags --libs` in the Visual Studio Code</a></li>
  </ul>
  <p>And I'm just not seeing a clear solution.  The solutions from DarkTrick work, but are pretty ugly. Ugly enough to push one over to Visual Studio instead of VS Code.  Another option is to use CMakeLists.txt with VS Code.  That uses multiple .vscode files, but at least they are generated as opposed to just hacked.</p>
  <p>Anybody else got a simple solution to use <em>pkg-config</em> with VS code and launch.json?</p>