title: Are there different types of .lib files?
body: <p>I've compiled a <a href="https://wiki.qt.io/Qt_for_Beginners#Our_first_window" rel="nofollow noreferrer">minimal example</a> of code using Qt, and noticed that linking to its <code>.lib</code> files added a requirement for my compiled program to link to its corresponding <code>.dll</code> file.</p>
  
  <p>I want to create a <code>.lib</code> myself for one of my other projects to use, but want to do so without having to also make a <code>.dll</code> for it to have to link to.</p>
  
  <hr>
  
  <p>From the answer to this question: <a href="https://stackoverflow.com/q/2649334/2886326">Difference between static and shared libraries?</a></p>
  
  <blockquote>
    <p>Static libraries are .a (or in Windows .lib) files. All the code relating to the library is in this file, and it is directly linked into the program at compile time. A program using a static library takes copies of the code that it uses from the static library and makes it part of the program. [Windows also has .lib files which are used to reference .dll files, but they act the same way as the first one].</p>
  </blockquote>
  
  <p><strong>Am I correct in understanding that there are two types of <code>.lib</code> files:</strong></p>
  
  <ul>
  <li>a type that copies the code in it into the compiled program (removing the need for a <code>.dll</code> link)</li>
  <li>a type that adds references to a <code>.dll</code> file into the compiled program</li>
  </ul>
  
  <p>If this observation is correct, <strong>how would one go about compiling a <code>.lib</code> of one of these types?</strong></p>