title: SFML linker error: unresolved external symbol _WinMain@16, Visual Studio 2012
body: <p>I was able to get <a href="http://www.sfml-dev.org/tutorials/1.6/start-vc.php" rel="nofollow">tutorial #1</a> to compile fine. But I can't get <a href="http://www.sfml-dev.org/tutorials/1.6/window-window.php" rel="nofollow">the 2nd one</a> to compile.</p>
  
  <p>When you do new -> Project, <em>maybe one of those settings are interfering?</em> Pretty sure I did empty project, else console.</p>
  
  <p>What's wrong?
  compile error:</p>
  
  <pre><code>Error   1   error LNK2019: unresolved external symbol _WinMain@16 referenced in function
  ___tmainCRTStartup  C:\...\02-videomode-iterate\MSVCRTD.lib(crtexew.obj)    02-videomode-iterate
  Error   2   error LNK1120: 1 unresolved externals   C:\...\Debug\02-videomode-iterate.exe   02-videomode-iterate
  </code></pre>
  
  <p>entire source:</p>
  
  <pre><code>#include &lt;SFML/Window.hpp&gt;
  
  int main()
  {
      sf::Window App(sf::VideoMode(800, 600, 32), "SFML-tut: 02");
  
      bool Running = true;
      while (Running)
      {
          App.Display();
      }
  
      return EXIT_SUCCESS;
  }
  </code></pre>
  
  <p>Project settings:</p>
  
  <blockquote>
    <p>include dir, lib: dir set correctly.</p>
  </blockquote>
  
  <p>c++ -> preprocessor -> preprocessor definitions:</p>
  
  <blockquote>
    <p>SFML_DYNAMIC</p>
  </blockquote>
  
  <p>linker -> input</p>
  
  <blockquote>
    <p>tried: <code>sfml-window.lib</code> and <code>sfml-window-d.lib</code> ( visual studio seems to always use debug mode at start? but tutorial #1 only worked when I didn't use -d version.</p>
  </blockquote>
  
  <p>subsystem:</p>
  
  <blockquote>
    <p>/SUBSYSTEM:WINDOWS</p>
  </blockquote>