[Daily one to five] C static library and dynamic library

Source: Internet
Author: User

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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.