For more information about Linux programming library-general Linux technology-Linux programming and kernel, see the following. Author: Cao Jiang Hua Saidi technology world
With the continuous improvement and popularization of Linux performance, more and more people are engaged in application software development in Linux. Based on my experience in developing Linux applications, I will introduce some basic knowledge about Linux programming libraries.
Library definition and type
A programming library is a code set that can always be reused by multiple Linux software projects. Library is the goal of Linux software development. The C language is an example. It contains hundreds of reusable routines and tool code for debugging programs, including functions. It would be very troublesome to rewrite these functions every time you write new programs.
The use of programming libraries has two main advantages: one is to simplify programming and achieve code reuse; the other is to directly use many debugging testing and debugging tools.
Library files in Linux are divided into two categories: Shared Library and static library. The difference between the two is that only the Code required during program execution is dynamically loaded at runtime, static Loading during compilation.
Linux libraries are generally in the/lib or/usr/lib directory. Lib is the abbreviation of Library. It mainly stores the linked Library files of the system. Without this directory, the system cannot run normally. The/lib directory stores the shared libraries used when the program is running. Through shared libraries, many programs can reuse the same code, and these libraries can be stored in a public location, thus reducing the size of the running program. This directory contains various libraries used by the Program for link. Is the author/usr/lib (Red Hat Linux 9.0) Directory snapshot.
(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // tech.ccidnet.com/col/attachment/2005/9/500541.jpg'); ">
/Usr/lib directory Snapshot
The best way to differentiate database types is to look at their file suffixes. Generally, shared libraries use. so (abbreviation of Shared Object), the static link library usually uses. end of a (abbreviated as Archive ). By default, the shared library is usually green, while the static library is black.
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