title: CSFML with VS Code and MSVC cl.exe LNK2019 error
body: <p>So I'm brand new to the C language and have started taking a look at CSFML and have run into an issue when trying to compile in VS Code this is my tasks.json:</p>
  <pre class="lang-json prettyprint-override"><code>{
      &quot;tasks&quot;: [
          {
              &quot;type&quot;: &quot;cppbuild&quot;,
              &quot;label&quot;: &quot;C/C++: cl.exe build active file&quot;,
              &quot;command&quot;: &quot;cl.exe&quot;,
              &quot;args&quot;: [
                  &quot;/Zi&quot;,
                  &quot;/EHsc&quot;,
                  &quot;/Fe:&quot;,
                  &quot;${fileDirname}\\${fileBasenameNoExtension}.exe&quot;,
                  &quot;${file}&quot;,
                  &quot;-I${fileDirname}\\CSFML-2.5-windows-64-bit\\include&quot;,
                  &quot;-L${fileDirname}\\CSFML-2.5-windows-64-bit\\lib\\msvc&quot;
              ],
              &quot;options&quot;: {
                  &quot;cwd&quot;: &quot;${workspaceFolder}&quot;
              },
              &quot;problemMatcher&quot;: [
                  &quot;$msCompile&quot;
              ],
              &quot;group&quot;: {
                  &quot;kind&quot;: &quot;build&quot;,
                  &quot;isDefault&quot;: true
              },
              &quot;detail&quot;: &quot;Task generated by Debugger.&quot;
          }
      ],
      &quot;version&quot;: &quot;2.0.0&quot;
  }
  </code></pre>
  <p>this is my launch.json:</p>
  <pre><code>{
      // Use IntelliSense to learn about possible attributes.
      // Hover to view descriptions of existing attributes.
      // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
      &quot;version&quot;: &quot;0.2.0&quot;,
      &quot;configurations&quot;: [
          {
              &quot;name&quot;: &quot;cl.exe - Build and debug active file&quot;,
              &quot;type&quot;: &quot;cppvsdbg&quot;,
              &quot;request&quot;: &quot;launch&quot;,
              &quot;program&quot;: &quot;${fileDirname}\\${fileBasenameNoExtension}.exe&quot;,
              &quot;args&quot;: [],
              &quot;stopAtEntry&quot;: false,
              &quot;cwd&quot;: &quot;${workspaceFolder}&quot;,
              &quot;environment&quot;: [],
              &quot;externalConsole&quot;: false,
              &quot;preLaunchTask&quot;: &quot;C/C++: cl.exe build active file&quot;
          }
      ]
  }
  </code></pre>
  <p>and here is some simple code I'm trying to run to just make a window:</p>
  <pre class="lang-c prettyprint-override"><code>#include &lt;stdio.h&gt;
  #include &lt;SFML/Graphics.h&gt;
  int main(int argc, char const *argv[])
  {
      /*24 bit colour depth at 800 by 600 resolution*/
      sfVideoMode mode = {800, 600, 24};
      sfRenderWindow *window;
      /*This will be used in the main loop*/
      sfEvent event;
      /*Start creating the window*/
      window = sfRenderWindow_create(mode, &quot;SFML Test&quot;, sfResize | sfClose, NULL);
      if (!window)
      {
          puts(&quot;Unable to create window, aborting.&quot;);
          return 1;
      }
  
      /*Main loop*/
      while (sfRenderWindow_isOpen(window))
      {
          /*This processes the event que*/
  
          while (sfRenderWindow_pollEvent(window, &amp;event))
          {
              if (event.type == sfEvtClosed)
              {
                  puts(&quot;Closing render window.&quot;);
                  sfRenderWindow_close(window);
              }
          }
      }
      /*Cleanup*/
      sfRenderWindow_destroy(window);
      return 0;
  }
  }
  </code></pre>
  <p>but if attempt to run the program I get the following:</p>
  <pre><code>&gt; Executing task: C/C++: cl.exe build active file &lt;
  
  Starting build...
  Build finished with errors(s):
  main.c
  Microsoft (R) Incremental Linker Version 14.28.29333.0
  Copyright (C) Microsoft Corporation.  All rights reserved.
  
  /debug 
  &quot;/out:C:\Users\Student\OneDrive - Liverpool Hope University\Year 1\Core 2\Guide to Assessments and Policies\Coursework\4-in-a-row\main.exe&quot; 
  main.obj 
  main.obj : error LNK2019: unresolved external symbol __imp__sfRenderWindow_create referenced in function _main
  main.obj : error LNK2019: unresolved external symbol __imp__sfRenderWindow_destroy referenced in function _main
  main.obj : error LNK2019: unresolved external symbol __imp__sfRenderWindow_close referenced in function _main
  main.obj : error LNK2019: unresolved external symbol __imp__sfRenderWindow_isOpen referenced in function _main
  main.obj : error LNK2019: unresolved external symbol __imp__sfRenderWindow_pollEvent referenced in function _main
  C:\Users\Student\OneDrive - Liverpool Hope University\Year 1\Core 2\Guide to Assessments and Policies\Coursework\4-in-a-row\main.exe : fatal error LNK1120: 5 unresolved externals
  
  The terminal process terminated with exit code: -1.
  
  Terminal will be reused by tasks, press any key to close it.
  </code></pre>
  <p>As I said I'm very new to C so I'm not really sure what's going on my guess is that the dll's in the CSFML folder need to also be loaded some how but I really don't know</p>