Libraries under Linux

Source: Internet
Author: User
The library under Linux, no matter what platform, there are only two kinds, one is:
  • Dynamic libraries, multiple shares can be shared
  • Static libraries, compiled directly into the software
This form, no matter where, will not change! However, it can vary depending on the platform, for example: Under Windwos:. lib files and. dll files under Linux are:. A files and. So files are archived under Mac [I don't know yet]
Therefore, the use of different platforms, some are different, but the principle is the same, we only learned the principle, can be extrapolate, on different platforms for reasonable operation and fluency of excessive
Both static and dynamic libraries have advantages and disadvantages, these advantages and disadvantages to learn the rational use, and, every way will be, so that we can cut according to the actual situation, the most appropriate configuration of the software I simply give a few examples: dynamic library, can be multiple software sharing, and only one, if, There are many software to share, then, this is a good way, for example, Baidu's map, provides a so file, so that all the machine can be used, you can not recompile the static library, can be directly compiled into the software, do not have to crawl, a software hanging a lot of dynamic package, This is an unfriendly behavior, and, some software dynamic package super large, and, you are only using one of the small features, this is undoubtedly a bad practice! However, sometimes, you will also find that directly compiled into the software, there will be other bad places, such as: This single software, Super BIG! And it's a super big! Compiling is also a waste of time!
A word clear: large projects with dynamic library, small software directly static compilation
According to the UNIX philosophy: Do not create big things, try to keep concise, we have always been advice, as small as possible, to do invincible little Superman!

Libraries under Linux

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.