1.
. O is equivalent to the OBJ file in windows. a. C or. cpp file corresponds to a. o file.
. A is a combination of multiple. O files for static connections, that is, static mode. Multiple. A files can be linked to generate an EXE executable file.
. So is a shared object for dynamic connection. It is similar to Windows DLL and is loaded only when used.
TS: Error while loading shared libraries: libs. so: cannot open shared object file: no such file or directory system cannot find our own libs. so, tell him to modify the variable LD_LIBRARY_PATH.
2. How to generate the so dynamic library file?
Compile: Get the output file libs. o
Gcc-FPIC-g-c s. C-o libs. o
Link: Get the output file libs. So
Gcc-g-shared-wl,-soname, Libs. So-O libs. So libs. O-lC
TS: Error while loading shared libraries: libs. so: cannot open shared object file: no such file or directory system cannot find our own libs. so, tell him to modify the variable LD_LIBRARY_PATH.
3. How to generate a static library file?
Compile: Get the output file libs. o
Gcc-FPIC-g-c s. C-o libs. o
Ar r. a. o
4.
View the. A structure, find the original file, and use ar-T Yourfile.
See the dynamic library with nm-D lib *. So