title: Compatibility of *.dll *.a *.lib *.def between VisualStudio and gcc
body: <p>this is very confusing. I spent a lot of time reading posts on this on stack, etc. Still confused.</p>
  
  <p>I am using Qt and C++ for coding.  In Qt, I am using the gcc option for a compiler.<br>
  The problem is that many 3rd party libraries that I've tried do not seem to work.</p>
  
  <p>I am new to .dll, .a, .lib, .def files and library schemes. </p>
  
  <p>Question 1:</p>
  
  <p>In my limited experience (I've tried 7 or 9 libraries so far), suppliers of libraries seldom tell you whether the .dll was made with VisualStudio or gcc. This adds a lot of confusion. They almost never make it clear what compiler the library is compatible with. So I would appreciate some real life tips of how to deal with this nightmare.  Almost all the libraries I tried are OpenSource projects.  I won't name names here, but these are well known projects.  I'm sure the problem is my lack of knowledge...</p>
  
  <p><strong>MinGW and gcc World</strong> </p>
  
  <p>Question2:<br>
  As far as I can tell, dynamic C++ libraries for MinGW gcc universe require these, right?<br>
  *.h<br>
  *.dll<br>
  *.a  </p>
  
  <p>Question 3:<br>
  Unfortunately, the .a file is often missing and the library does not work.  This is very confusing. If the .a file is missing am I out of luck?  </p>
  
  <p>Question 4:<br>
  Can I generate the .a file for MinGW/gcc if the *.dll was made with gcc?</p>
  
  <p>Question 5: 
  Can I generate the .a file for MinGW/gcc if the *.dll was made with VisualStudio?</p>
  
  <p>Question 6:<br>
  Is it possible that a *.dll (made with MinGW/gcc) is too old and no longer compatible with newer MinGW/gcc?</p>
  
  <p>Question 7:<br>
  Qt projects using MinGW/gcc never need *.lib files, right? That is a VisualStudio only thing, right?</p>
  
  <p>Question 8:<br>
  I don't need a *.def file to use a *.dll in a Qt projects using MinGW/gcc, right?</p>
  
  <p><strong>VisualStudio World</strong> </p>
  
  <p>Question 9:<br>
  As far as I can tell, dynamic C++ libraries for VisualStudio require these:<br>
  *.h<br>
  *.dll<br>
  *.lib  </p>
  
  <p>Right?  Again, the problem is that the *.lib file is almost always missing.  Plus, no clear instructions about what compiler the library is compatible with.  So how can I know that it is for VisualStudio only or not?  </p>
  
  <p>Question 10:<br>
  If the .lib file is missing am I out of luck?   </p>
  
  <p>Question 11:<br>
  Can I generate the .lib file for VisualStudio if the *.dll was made with VisualStudio? How?</p>
  
  <p>Question 12:<br>
  Can I generate the .lib file for  VisualStudio if the *.dll was made with MinGW/gcc? How?</p>
  
  <p>Question 13:<br>
  Is it possible that a *.dll (made with VisualStudio) is too old and no longer compatible with newer VisualStudio?</p>
  
  <p>Question 14:<br>
  If in QtCreator I select the VisualStudio compiler, is that 100% compatible with dynamic libraries compiled with REAL VisualStudio by someone else? I believe the VisualStudio compiler option in Qt Creator is a fake VisualStudio compiler. </p>
  
  <p>Question 15:<br>
  If in QtCreator I select the MinGW/gcc compiler, can I use with Qt dynamic libraries compiled with REAL VisualStudio by someone else? </p>
  
  <p>Question 16:<br>
  I don't need a *.def file to use a *.dll in a Qt projects using MinGW/gcc, right?</p>
  
  <p>Question 17:
  Can I convert a *lib (that works with a *.dll and *.h) file made with REAL VisualStudio to a *.a file so I can use the *.a file with the unmodified *.dll, and *.h files in a Qt gcc project?</p>