This article was reprinted from: 1190000000580216
static function library
The general extension is (. A), and this class of libraries typically has a libxxx.a extension.
Such libraries are compiled directly into the program, so the use of static libraries compiled into the file will be larger, such libraries the greatest advantage is that the successful compilation of executable files can be run independently, and no longer need to external requirements to read the contents of the function cry, but from the upgrade of the ease of view obviously no advantage, If the function library is updated, it needs to be recompiled.
Dynamic Function Library
The extension of the dynamic library is generally (. so), which is typically named Libxxx.so.
and the static function library is the entire capture to the program, the dynamic function library at compile time, in the program there is only a "point" location, that is, when the executable file needs to use the function library mechanism, the program will read the function library to use, that is, the executable file cannot be run alone.
As you can see, the static function library may be source code, and the dynamic library itself may be an executable file.
The difference between static compilation and dynamic compilation "Go"