[solved] DLL compilation outputs .a file, what is it?
-
I have downloaded the Lua 5.2.3 sources and imported the source files in an empty Qt project. After compilation for shared library (no errors) the output directory contains two non object (.o) files: lua5.2.dll and liblua5.2.a.
Dumb deduction: I should be interested in the DLL file.
Question is, what is that liblua5.2.a file? Why is it there? Do I need it?
I remember static libraries used to have .a extension. Does this mean the compiler outputted both the static and the shared libraries? (I highly doubt this)Thank you in advance for any explanation!
p.s. I can upload the files if you wish to have a look, just ask -
No you should not include it.
You should include header files .hAnd add .a or .lib as a parameter for linker.
If you use QtCreator then use add library "wizard":https://qt-project.org/doc/qtcreator/creator-project-qmake-libraries.html
It will generate all correct options. -
I think so. But I did not build any Qt project for Windows yet.
See "LIBS":http://qt-project.org/doc/qt-5/qmake-variable-reference.html#libs for more detals. -
I was reading that page as well, but it only makes examples with .lib files. I guess that would be the same for .a files?
EDIT
Confirmed. The gcc compiler outputs .a files, while MSVC outputs .lib files. But both are handled with the same LIBS qmake variable.Thank you very much for help, andreyc :)