title: Using SFML with Visual Studio 2010
body: <p>Right now I'm trying to get SFML to work with my Visual Studio 2010, so I can start learning how to make windows applications and games using the libraries within SFML. I'm following the tutorial <a href="http://www.sfml-dev.org/tutorials/1.6/window-window.php" rel="nofollow noreferrer" title="This is the SFML main site">here</a> to open a new window, but my program seems to break instantly. I really don't know why :S. It seems to build and compile, but then breaks:</p>
  
  <p><img src="https://i.stack.imgur.com/Bsp0R.jpg" alt=""></p>
  
  <p>Edit: It breaks at this line: <code>App.Create(sf::VideoMode(800, 600, 32), "SFML Window");</code></p>
  
  <pre><code>#include &lt;SFML/Window.hpp&gt;
  
  int main ()
  {
      sf::Window App;
      App.Create(sf::VideoMode(800, 600, 32), "SFML Window");
      bool Running = true;
      while (Running)
      {
          sf::Event Event;
          while (App.GetEvent(Event))
          {
              if (Event.Type == sf::Event::Closed)
                  Running = false;
  
              if ((Event.Type == sf::Event::KeyPressed) &amp;&amp; (Event.Key.Code == sf::Key::Escape))
                  Running = false;
  
          }
          App.Display();
      }
  
      return EXIT_SUCCESS;
  }
  </code></pre>
  
  <p>Also, I should note:
  On the SFML website, the tutorials for setting it up with Visual Studio seem to be for VS 2008 (Setting up SFML with VS). I managed to get a set of instructions for VS2010 and set it up. I used a short program to test if the SFML libraries were working:</p>
  
  <pre><code>#include &lt;SFML/System.hpp&gt;
  #include &lt;iostream&gt;
  
  int main()
  {
      sf::Clock Clock;
      while (Clock.GetElapsedTime() &lt; 5.f)
      {
          std::cout &lt;&lt; Clock.GetElapsedTime() &lt;&lt; std::endl;
          sf::Sleep(0.5f);
      }
  
      return 0;
  }
  </code></pre>
  
  <p>^ This program worked fine. </p>