title: How to add a command to the linker in Visual Studio Code
body: <p>I try to compile my C++ code in Visual Studio Code but every time I get the following error:</p>
  <blockquote>
  <p>undefined reference to ...</p>
  </blockquote>
  <p>I have to add <code>-lgdiplus-lgdi32</code> to my compiler/linker options. How can I do this in Visual Studio?</p>
  <p>This is a part of my <code>task.json</code> file:</p>
  <pre><code>&quot;args&quot;: [
      &quot;-fdiagnostics-color=always&quot;,
      &quot;-g&quot;,
      &quot;${file}&quot;,
      &quot;-o&quot;,
      &quot;${fileDirname}\\${fileBasenameNoExtension}.exe&quot;,
      &quot;-lgdiplus&quot;,
      &quot;-lgdi32&quot;
  ],
  </code></pre>