What is the difference between .o, .a, and .so files?

前端 未结 3 578
北恋
北恋 2021-01-30 06:56

I know .o are object files, .a are static libraries and .so are dynamic libraries? What is their physical significance? When can I use som

3条回答
  •  醉梦人生
    2021-01-30 07:40

    .so are shared library files. .a are static library files.

    You can statically link to .a libraries and dynamically link and load at runtime .so files, provided you compile and link that way.

    .o are object files (they get compiled from *.c files and can be linked to create executables, .a or .so libraries. Read more about it here

提交回复
热议问题