title: SFML: undefined reference to _imp_
body: <p>I'm trying to create a C++ application with SFML. Followed the tutorial, installed MinGW for Windows. My project has a main.cpp file in its root folder, and SFML is included in lib/sfml (relative to main.cpp).</p>
  
  <p>I can compile without problems with the command <code>g++ -c main.cpp -g -o build/debug/game.o -Ilib/sfml/include</code></p>
  
  <p>But I get undefined references when I try to link wit the command <code>g++ build/debug/game.o -o build/debug/game.exe -Llib/sfml/lib -lsfml-graphics-d -lsfml-window-d -lsfml-system-d</code></p>
  
  <p>Some of the errors:</p>
  
  <pre><code>C:\Users\andre\Documents\Repos\Game/main.cpp:5: undefined reference to `_imp___ZN2sf6StringC1EPKcRKSt6locale'
  C:\Users\andre\Documents\Repos\Game/main.cpp:5: undefined reference to `_imp___ZN2sf9VideoModeC1Ejjj'
  C:\Users\andre\Documents\Repos\Game/main.cpp:5: undefined reference to `_imp___ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'
  </code></pre>
  
  <p>I've searched already and nothing seems to help me. What I found strange is that in some previous versions of SFML it came with more libs inside the lib folder, like opengl32.lib. Still, it says that, for example, sfml-graphics I need:</p>
  
  <pre><code>sfml-window-s.lib
  sfml-system-s.lib
  opengl32.lib
  freetype.lib
  jpeg.lib
  </code></pre>
  
  <p>The only one missing is opengl32.lib. If I consider sfml-system and sfml-window, it is missing too winmm.lib, gdi32.lib. I don't know if this has something to do with the errors, but any help is welcome.</p>