title: Can't use my own DLL which uses SFML
body: <p>I'm making my own game library which uses SFML with VS2013. I want to reuse the code by setting the library as DLL. However, I'm having trouble while using my own DLL.</p>
  
  <p>Here are the detailed descriptions of my situation:</p>
  
  <ol>
  <li><p>Here is part of the code in the game loop where <code>window</code> is a <code>sf::RenderWindow</code> and <code>rect</code> is a object defined in my DLL which simply is just a <code>sf::RectangleShape</code> with defined properties ( a small blue rectangle at (0,0)).</p>
  
  <pre><code>window.clear(sf::Color::White);
  window.draw(rect);
  window.display();
  </code></pre>
  
  <p>However, after the <code>window.draw(rect)</code>, the whole screen will turn into black, even though the above statement should clean it as white and <code>rect</code> only occupies a small place at the upper left corner.</p></li>
  <li><p>There should be no problem with my class, since if I paste the class declaration and definition directly into the main source file (of course deleting the stuff like <code>__declspec(dllexport)</code>), everything works nicely. </p></li>
  <li><p>All the functions in my DLL which do not use SFML works correctly when loading from the DLL.</p></li>
  <li><p>SFML is statically linked both in the DLL project and the project which uses it.</p></li>
  <li><p>I've viewed and  followed the MSDN to setup my projects.</p></li>
  </ol>
  
  <p>So how to fix it? I suppose the problem should be that I missed some steps which enable a DLL to use another library, but I didn't find relevant threads (probably I used wrong keywords...)</p>