PDA

View Full Version : Difference and Importance of ".a" and ".lib"



iamDAMON
1st October 2012, 08:43
Hi guys!

Can someone help me with this!

1. What's the difference between .a and .lib?
2. When are these files being generated?
3. How can I include libraries using .a file? and lib file?

Thanks in advance guys!

Zlatomir
1st October 2012, 09:11
Those questions can't be answered so generically...

1) .a are static libraries on Linux-es and .lib are static libraries on Windows
2) those are generated when you build your code that is configured to output a static library (when you build Qt if you talk about that...)
3) For Qt ones you add QT += module in the .pro file and the tools add those for you and if you talk about other libraries see LIBS (http://qt-project.org/doc/qt-4.8/qmake-variable-reference.html#libs) and INCLUDEPATH (http://qt-project.org/doc/qt-4.8/qmake-variable-reference.html#includepath)

wysota
1st October 2012, 13:50
Hi guys!

Can someone help me with this!

1. What's the difference between .a and .lib?
2. When are these files being generated?
3. How can I include libraries using .a file? and lib file?

Thanks in advance guys!

Please post questions unrelated to Qt on the "General Programming" forum.