this is very confusing. I spent a lot of time reading posts on this on stack, etc. Still confused.
I am using Qt and C++ for coding. In Qt, I am using the gcc option for a compiler.
The problem is that many 3rd party libraries that I've tried do not seem to work.
I am new to .dll, .a, .lib, .def files and library schemes.
Question 1:
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...
MinGW and gcc World
Question2:
As far as I can tell, dynamic C++ libraries for MinGW gcc universe require these, right?
*.h
*.dll
*.a
Question 3:
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?
Question 4:
Can I generate the .a file for MinGW/gcc if the *.dll was made with gcc?
Question 5: Can I generate the .a file for MinGW/gcc if the *.dll was made with VisualStudio?
Question 6:
Is it possible that a *.dll (made with MinGW/gcc) is too old and no longer compatible with newer MinGW/gcc?
Question 7:
Qt projects using MinGW/gcc never need *.lib files, right? That is a VisualStudio only thing, right?
Question 8:
I don't need a *.def file to use a *.dll in a Qt projects using MinGW/gcc, right?
VisualStudio World
Question 9:
As far as I can tell, dynamic C++ libraries for VisualStudio require these:
*.h
*.dll
*.lib
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?
Question 10:
If the .lib file is missing am I out of luck?
Question 11:
Can I generate the .lib file for VisualStudio if the *.dll was made with VisualStudio? How?
Question 12:
Can I generate the .lib file for VisualStudio if the *.dll was made with MinGW/gcc? How?
Question 13:
Is it possible that a *.dll (made with VisualStudio) is too old and no longer compatible with newer VisualStudio?
Question 14:
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.
Question 15:
If in QtCreator I select the MinGW/gcc compiler, can I use with Qt dynamic libraries compiled with REAL VisualStudio by someone else?
Question 16:
I don't need a *.def file to use a *.dll in a Qt projects using MinGW/gcc, right?
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?