Daily C-ordered static and dynamic librariesEvery day, I picked up a C-language shell, which grew up and formed thousands of miles.
Today's shells: Comparison and Analysis of static and dynamic libraries in C LanguageLibrary: A file compiled from standard common functions. It aims to improve the reusability of common functions and reduce the burden on developers. Common sdtio. h and math. h libraries are the tip of the iceberg of the C function library.1. Static Library: Refers to copying the entire library to an executable file during the compilation link stage.1.1 advantage: the program with static links does not rely on external database support and has good portability.1.2 disadvantage: every database update requires re-Compilation of the program, even if the update is small or only partial.1.3 disadvantages: each program with a static link has a library file, which increases hard disk space consumption during storage and memory consumption during runtime.2. Dynamic library: indicates that the Library is linked to the executable program only when the runtime is known.1.1 advantage: Dynamic-link programs do not need to contain libraries and occupy much less space.1.2 advantage: At runtime, the system memory only needs to provide a shared library for dynamic connections of all programs, reducing memory consumption.1.3 disadvantages: It can be run only when the system supports dynamic libraries, and there may be incompatibility issues with dynamic libraries.Summary: in linux: static library.Dynamic library. soIn windows: static library. libDynamic library. dllHave a nice day!