Linux

Library (static library, shared library)

구씨언니 2020. 4. 28. 16:05
반응형

Types

Two general types of library: Static / Shared

 

Extensions

Extension of Static Library in Linux: .a (archive), .la (libtool archive)

Extension of Shared Library in Linux: .so (shared object)

 

* .la files are static libraries used by the GNU "libtools" package

* the libtool control file name (.la suffix) differs from the standard library name (.a suffix)
* .lo file is the libtool object, which Libtool uses to determine what object file may be built into a shared library

 

How does the libraries work?

-Static Library

Static Library (source: apple.com)

- Shared library

Shared Library (source: apple.com)

 

Please let me know if there's anything wrong ;)

 

Reference:

Library: https://medium.com/@eightlimbed/static-vs-shared-libraries-a0c622e7c1d5

.la files: http://openbooks.sourceforge.net/books/wga/dealing-with-libraries.html
.lo files: https://www.gnu.org/software/libtool/manual/html_node/Creating-object-files.html

반응형