Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the difference between .so and .a files?

I am trying to compile a 3rd party library( on linux) and see that it is generating libsomething.a files I have my other libraries which are .so file

But it appears that even .a is shared library and can be used just like a .so lib

So is there any difference between the two ? or they are just same with different naming convention.

like image 395
rajshenoy Avatar asked Feb 02 '23 20:02

rajshenoy


1 Answers

A .a file is a static library, while a .so file is a shared object dynamic library similar to a DLL on Windows.

A .a can be included as part of a program during the compilation. A .so can be imported, while a program loads.

like image 83
gks Avatar answered Feb 04 '23 09:02

gks