title: How to link to an xxx.dll when the provider only ships it with an xxx.lib and you are using MinGW-w64 and not MSVC?
body: <p><strong>Firebird</strong> and <strong>Boost</strong> communities only provide the <strong>xxx.lib</strong> for their pre-built <strong>xxx.dll</strong> binaries,</p>
  
  <p>and I am using <strong>MinGW-w64 v7.0.0</strong> with <strong>GCC v8.1.0</strong>,</p>
  
  <p>and this last one expects a <strong>libxxx.a</strong> file containing all the <strong>xxx.dll</strong> function symbols to link with.</p>
  
  <p>For <strong>Boost</strong>, I can build it from the source code for <strong>MinGW-w64</strong> (though I still prefer using the pre-built ones, because the build process for big toolkits like this one takes forever).</p>
  
  <p>As for <strong>Firebird</strong>, it is not buildable using <strong>MinGW-w64</strong> at all, except if patched, and I can't guarantee that the patched source files will produce a safe <strong>fbclient.dll</strong> for production.</p>
  
  <p>And I have heard that newer versions of <strong>MinGW-w64</strong> accept <strong>direct linking</strong> to a <strong>.dll</strong>,</p>
  
  <p>Is this true? is it just <strong>MinGW-w64 .dll</strong>s, only <strong>C .dll</strong>s or including <strong>C++</strong> ones, or any kind of a <strong>.dll</strong> including <strong>MSVC</strong> ones.</p>
  
  <p>You may say: "<strong>Why don't I just use Msys2!?</strong>"</p>
  
  <ol>
  <li><strong>Msys2</strong> is a patch based software, and I have seen a lot of libraries like <strong>libcurl</strong> that are still not purely static (the static version, the <strong>.a</strong> one not the <strong>.dll.a</strong> one) still depends on one or more external <strong>.dll</strong>s (not the system ones).</li>
  <li><strong>Msys2</strong> is <strong>Dwarf2</strong> based exception handling and I am using the <strong>sjlj</strong> one.</li>
  <li><strong>Msys2</strong> uses a very recent tool-chain <strong>v9.2.0</strong> and libraries like <strong>winpthreads</strong>, <strong>libwinpthread</strong> and <strong>zstd</strong> that are no longer supported in <strong>Windows XP</strong> (<strong>Windows XP!? YES</strong>, more of my clients are still using it), so I have to downgrade the tool-chain.</li>
  </ol>
  
  <p>So, what are my options, for linking here?</p>
  
  <p>TIA.</p>