title: How does a vendor supplied C++ library support multiple compilers?
body: <p>I make use of a vendor supplied library in a <code>C++ program</code>. All the vendor supplies is a <code>.lib, .dll and the header files.</code> </p>
  
  <p>This library was first used in <code>MSVC++ 6</code> and now in <code>MSVC 2010.</code> </p>
  
  <p>It appears they support mingw, qt, etc. I have had no problems with using it in either debug or release mode.</p>
  
  <p>I have recently added another dependency to the project, <code>yaml-cpp</code>, an open-source project that provides no binaries. I am able to build yaml-cpp using cmake and MSVC 2010 as a static library and can link it to my project successfully. </p>
  
  <p>In order to do this <strong>I must link to the debug</strong> and <strong>release</strong> versions of the <code>.lib</code> respectively as I have run in to weird Microsoft CRT/linker issues I am just learning about.</p>
  
  <p>I am curious, <strong>how does the vendor of my first library (libXl if you are curious)</strong> provide a <code>.lib and .dll</code> that works on a range of compilers <strong>without worrying about the CRT version</strong>? </p>
  
  <p>How do you write code that allows this or is it the linking process? <code>yaml-cpp</code> is a <strong>cross platform library</strong>, is it possible for me to compile it in a similar way that would allow me to use a single .lib within my project?</p>
  
  <p>I am not sure what resources to look for to learn more about it. How do people learn about this kind of stuff? Thanks!</p>