title: MinGW g++: Multiple definition of vsnprintf when using to_string
body: <p>I just started using MinGW for Windows. When trying to create executable using</p>
  
  <p><code>g++ a.cpp -o a.exe -std=c++14</code></p>
  
  <p>for the code below:</p>
  
  <pre><code>#include &lt;string&gt;
  
  using namespace std;
  
  int main()
  {
      string x = to_string(123);
      return 0;
  }
  </code></pre>
  
  <p>I'm getting following error:</p>
  
  <pre><code>C:/mingw/bin/../lib/gcc/mingw32/5.3.0/../../../libmingwex.a(vsnprintf.o):(.text+0x0): multiple definition of vsnprintf
  C:\Users\..\Local\Temp\cc4sJDvK.o:c:/mingw/include/stdio.h:426: first defined here
  collect2.exe: error: ld returned 1 exit status
  </code></pre>
  
  <p>What is the root cause for this error and how can I make it go away? While I can easily find a replacement for <code>to_string()</code> function I'm not sure what is causing this error to occur in the first place.</p>