Difference between .a and .so file

Difference between .a and .so file

Came across an interesting problem which gave rise to this question.

What is the difference between .a and .so file?

After some research and finding I could find some details.

Thought to put it up to share.

Difference between .a and .so file

The .a files are the Static libraries. Whereas, the .so files are Shared or Dynamic libraries, also known as Dynamically linked shared object libraries.

These two are basically the two type of C/C++ library files for Linux.

  • Static libraries (.a): Library of object code which is linked with, and becomes part of the application.
  • Dynamically linked shared object libraries (.so): There is only one form of this library but it can be used in two ways.
    • Dynamically linked at run time but statically aware. The libraries must be available during compile/link phase. The shared objects are not included into the executable component but are tied to the execution.
      Dynamically loaded/unloaded and linked during execution (i.e. browser plug-in) using the dynamic linking loader system functions.

    You can find some more details about Linux Library files in some upcoming articles.

    No Comments

    Post a Comment

    Time limit is exhausted. Please reload CAPTCHA.