早上嘴苦是什么原因| 不洁是什么意思| 85年属什么生肖| 宝批龙是什么意思| 什么叫淋巴结转移| 活着的意义是什么| 是什么单位| 黑豚肉是什么肉| qs排名是什么意思| 梦见小狗是什么意思| 门神是什么意思| 女生喜欢什么| 正常白带是什么样子| 红糖是什么做的| 感冒流鼻涕吃什么药| 病入膏肓什么意思| 桂花像什么| item什么意思| 苦笑是什么意思| 外感是什么意思| 蛛网膜囊肿是什么病| 吃什么对肝脏有好处能养肝| 喉咙发炎吃什么药好得快| 冰激凌和冰淇淋有什么区别| 香鱼又叫什么鱼| 流产后不能吃什么东西| 县法院院长是什么级别| 油皮适合用什么护肤品| 干净的什么| 胸口中间疼挂什么科| psa是什么| 做三明治需要什么材料| 干涉是什么意思| 嗜是什么意思| 长痘痘吃什么水果好| 踏板摩托车什么牌子好| 补维生素吃什么药最好| 火星是什么意思| 暂时无法接通是什么意思| 餐中服用是什么意思| mssa是什么细菌| 万圣节是什么时候| 氧分压低是什么原因| 叶酸片什么时候吃合适| item什么意思| 蝉的鸣叫声像什么| 奥肯能胶囊是什么药| 神经炎吃什么药| 肝内钙化斑是什么意思| 男人时间短吃什么药| 打酱油是什么意思| 兵解是什么意思| 脸上容易出油是什么原因| 今天晚上吃什么| vos是什么意思| 吃什么水果能降血压| qt是什么| 和谐是什么| 茶走是什么意思| 太岁是什么东西| 水痘吃什么药| 淋巴结有什么症状| 金牛座和什么星座最配| 八月六号是什么星座| 金酒兑什么好喝| 垂体是什么意思| 蚊子喜欢什么颜色| 埋单是什么意思| 吃什么食物可以去湿气| 幼小衔接是什么意思| 糖尿病人能吃什么| 氮泵有什么作用| 老鼠为什么会飞| 顶格是什么意思| 梦见蜂蜜是什么意思| 红房子是什么| 歇后语是什么意思| 张钧甯为什么读mi| 什么叫脂溢性脱发| 化疗期间吃什么好| 心脏五行属什么| 不孕不育挂什么科| 长颈鹿吃什么树叶| 做喉镜能检查出什么病| 什么时候开始降温| 吃柿子有什么好处和坏处| 脑门长痘痘是什么原因| 乌龟都吃什么| 文房四宝是什么| 顺风顺水是什么生肖| 运钞车押运员是什么人| 12306什么时候放票| 淋巴结核是什么病| 左胳膊发麻是什么原因| 野人是什么意思| 肝内脂质沉积是什么意思| 吃西瓜有什么坏处| 亏空是什么意思| 黄喉是什么动物身上的| 卵巢囊性包块是什么意思| 啤酒兑什么饮料好喝| 什么入胜| 血红蛋白低说明什么| 糜烂性胃炎可以吃什么蔬菜| 赤什么意思| 预警是什么意思| 埋单是什么意思| 画地为牢下一句是什么| 看包皮挂什么科| 痿是什么意思| 耳膜穿孔什么症状| 第二学士学位是什么意思| 邪气是什么意思| 周期性是什么意思| 什么是风寒感冒| 福是什么生肖| 枯草芽孢杆菌治什么病| 过期的咖啡有什么用途| 妈妈的爸爸叫什么| 狗狗中毒了用什么办法可以解毒| 淡水鱼什么鱼最好吃| 肉桂和桂皮有什么区别| 孤单是什么意思| 岁月蹉跎什么意思| 暗物质是什么| 迄今为止什么意思| 身上起红斑是什么原因| 山竹不能和什么水果一起吃| 血瘀是什么意思| 脚有酸臭味是什么原因| 宫颈管短是什么意思| 吃什么水果对皮肤好又美白| bm是什么牌子| 动物园里有什么游戏| 肝有问题会出现什么症状| 为什么生理期过后最容易掉秤| 导管子是什么意思| 军衔是什么意思| ecmo是什么| 手指头发麻是什么原因| 为什么耳屎是湿的| 龙凤呈祥是什么意思| 十一月六号是什么星座| 什么床垫好| 喘息是什么意思| 什么孕妇容易怀脑瘫儿| 脑心通主治什么病| 雷人是什么意思| 嘴唇发乌是什么原因| 出生医学证明有什么用| 芒果对身体有什么好处| 圆脸女生适合什么发型| 今年56岁属什么生肖| 心理素质是什么意思| 澳大利亚有什么特产| 什么是湿气| xpe是什么材料| 神态自若是什么意思| 血脂高吃什么油| 中秋节是什么时候| 局限是什么意思| 梦见家里着火了是什么征兆| 肝多发小囊肿什么意思| 鹿鞭是什么| 东四命是什么意思| 八卦是什么生肖| 什么花的花语是自由| 治霉菌性阴炎用什么药好得快| 玛瑙是什么材质| 三国之前是什么朝代| 吃饭后肚子疼是什么原因| 跖围是什么意思| 十羊九不全是什么意思| 雷人是什么意思啊| 劲酒是什么酒| 拔完牙不能吃什么| 吃什么排铅最快| 滑膜炎用什么膏药好| 便秘吃什么药最好| 妇乐颗粒的功效能治什么病| 洋葱有什么好处| 甘油三酯偏高有什么危害| 后下药什么时候下| 槐树什么时候开花| 阴道变黑是什么原因| 什么是交际花| 胆囊壁稍毛糙是什么意思| 屎壳郎长什么样| 拉伤筋用什么药好| d2聚体高是什么原因| 有市无价是什么意思| 奶酪是什么东西| 什么桥下没有水脑筋急转弯| 包面是什么| 麦麸是什么| 便民门诊是做什么的| 生脉饮适合什么人群| 猴子屁股为什么是红色| 每个月14号都是什么情人节| 吃完虾不能吃什么水果| 增加胃动力最好的药是什么药| 姐夫的爸爸叫什么| 低烧吃什么药最好| cue什么意思| 什么时候排卵期| 还有什么寓言故事| 富士康体检都检查什么| 剖腹产后吃什么| p0s是什么意思| 舌头辣辣的是什么原因| 高我是什么意思| 匈奴人是现在的什么人| 大禹的爸爸叫什么| 办什么厂比较好| 诗韵是什么意思| 扁桃体肿大吃什么药好| 9月3号是什么日子| 一直呕吐是什么原因| quake是什么意思| 相刑什么意思| 女生喝什么茶好| 皮试是什么| 傍晚是什么时候| 天庭饱满是什么意思| 指甲变空是什么原因| 李世民是什么生肖| 支原体肺炎用什么药| 闻所未闻是什么意思| 海参什么人不适合吃| 此物非彼物是什么意思| 粉碎性骨折吃什么好| 胃痛吃什么药效果最好| 乐趣是什么意思| 站桩有什么好处| 当归什么味道| py什么意思| 黎字五行属什么| 艾滋病有什么症状图片| 八年是什么婚| 照身份证穿什么颜色的衣服| 命中注定是什么意思| 转氨酶高吃什么药好| 还有什么寓言故事| 中药天龙又叫什么| 看男性性功能挂什么科| 眼睛干涩用什么药水| 母亲ab型父亲o型孩子什么血型| 回声增强什么意思| 降压药的原理是什么| 犹太人有什么特征| 天津为什么叫天津卫| 胃疼是什么感觉| 蜘蛛喜欢吃什么| 益生菌有什么好处| dx是什么药| 兽医是什么专业| 橘白猫是什么品种| 什么人不能喝蜂蜜| o型血和b型血生的孩子是什么血型| 蓝天白云是什么生肖| 次第花开是什么意思| 牙为什么会疼| 下午8点是什么时辰| 默契是什么意思| 百度

大奖在身边 2016大乐透送617注头奖惠31个省份

百度 但是,100多年前,它的建成却记载着我们国家的一段耻辱历史。

In computing, a library is a collection of resources that can be used during software development to implement a computer program. Commonly, a library consists of executable code such as compiled functions and classes, or a library can be a collection of source code. A resource library may contain data such as images and text.

Illustration of an application which uses libvorbisfile to play an Ogg Vorbis file

A library can be used by multiple, independent consumers (programs and other libraries). This differs from resources defined in a program which can usually only be used by that program. When a consumer uses a library resource, it gains the value of the library without having to implement it itself. Libraries encourage software reuse in a modular fashion. Libraries can use other libraries resulting in a hierarchy of libraries in a program.

When writing code that uses a library, a programmer only needs to know how to use it – not its internal details. For example, a program could use a library that abstracts a complicated system call so that the programmer can use the system feature without spending time to learn the intricacies of the system function.

History

edit

The idea of a computer library dates back to the first computers created by Charles Babbage. An 1888 paper on his Analytical Engine suggested that computer operations could be punched on separate cards from numerical input. If these operation punch cards were saved for reuse then "by degrees the engine would have a library of its own."[1]

 
A woman working next to a filing cabinet containing the subroutine library on reels of punched tape for the EDSAC computer.

In 1947 Goldstine and von Neumann speculated that it would be useful to create a "library" of subroutines for their work on the IAS machine, an early computer that was not yet operational at that time.[2] They envisioned a physical library of magnetic wire recordings, with each wire storing reusable computer code.[3]

Inspired by von Neumann, Wilkes and his team constructed EDSAC. A filing cabinet of punched tape held the subroutine library for this computer.[4] Programs for EDSAC consisted of a main program and a sequence of subroutines copied from the subroutine library.[5] In 1951 the team published the first textbook on programming, The Preparation of Programs for an Electronic Digital Computer, which detailed the creation and the purpose of the library.[6]

COBOL included "primitive capabilities for a library system" in 1959,[7] but Jean Sammet described them as "inadequate library facilities" in retrospect.[8]

JOVIAL has a Communication Pool (COMPOOL), roughly a library of header files.

Another major contributor to the modern library concept came in the form of the subprogram innovation of FORTRAN. FORTRAN subprograms can be compiled independently of each other, but the compiler lacked a linker. So prior to the introduction of modules in Fortran-90, type checking between FORTRAN[NB 1] subprograms was impossible.[9]

By the mid 1960s, copy and macro libraries for assemblers were common. Starting with the popularity of the IBM System/360, libraries containing other types of text elements, e.g., system parameters, also became common.

In IBM's OS/360 and its successors this is called a partitioned data set.

The first object-oriented programming language, Simula, developed in 1965, supported adding classes to libraries via its compiler.[10][11]

Linking

edit

The linking (or binding) process resolves references known as symbols (or links) by searching for them in various locations including configured libraries. If a linker (or binder) does not find a symbol, then it fails, but multiple matches may or may not cause failure.

Static linking is linking at build time, such that the library executable code is included in the program. Dynamic linking is linking at run time; it involves building the program with information that supports run-time linking to a dynamic link library (DLL). For dynamic linking, a compatible DLL file must be available to the program at run time, but for static linking, the program is standalone.

Smart linking is performed by a build tool that excludes unused code in the linking process. For example, a program that only uses integers for arithmetic, or does no arithmetic operations at all, can exclude floating-point library routines. This can lead to smaller program file size and reduced memory usage.

Relocation

edit

Some references in a program or library module are stored in a relative or symbolic form which cannot be resolved until all code and libraries are assigned final static addresses. Relocation is the process of adjusting these references, and is done either by the linker or the loader. In general, relocation cannot be done to individual libraries themselves because the addresses in memory may vary depending on the program using them and other libraries they are combined with. Position-independent code avoids references to absolute addresses and therefore does not require relocation.

Categories

edit

Executable

edit

An executable library consists of code that has been converted from source code into machine code or an intermediate form such as bytecode. A linker allows for using library objects by associating each reference with an address at which the object is located. For example, in C, a library function is invoked via C's normal function call syntax and semantics.[12]

A variant is a library containing compiled code (object code in IBM's nomenclature) in a form that cannot be loaded by the OS but that can be read by the linker.

Static

edit

A static library is an executable library that is linked into a program at build-time by a linker (or whatever the build tool is called that does linking).[13][14] This process, and the resulting stand-alone file, is known as a static build of the program. A static build may not need any further relocation if virtual memory is used and no address space layout randomization is desired.[15]

A static library is sometimes called an archive on Unix-like systems.

Dynamic

edit

A dynamic library is linked when the program is run – either at load-time or runtime. The dynamic library was intended after the static library to support additional software deployment flexibility.

Sources

edit

A source library consists of source code; not compiled code.

Shared

edit

A shared library is a library that contains executable code designed to be used by multiple computer programs or other libraries at runtime, with only one copy of that code in memory, shared by all programs using the code.[16][17][18]

Object

edit

Although generally an obsolete technology today, an object library exposes resources for object-oriented programming (OOP) and a distributed object is a remote object library. Examples include: COM/DCOM, SOM/DSOM, DOE, PDO and various CORBA-based systems.

The object library technology was developed since as OOP became popular, it became apparent that OOP runtime binding required information than contemporary libraries did not provide. In addition to the names and entry points of the code located within, due to inheritance, OOP binding also requires a list of dependencies – since the full definition of a method may be in different places. Further, this requires more than listing that one library requires the services of another. In OOP, the libraries themselves may not be known at compile time, and vary from system to system.

The remote object technology was developed in parallel to support multi-tier programs with a user interface application running on a personal computer (PC) using services of a mainframe or minicomputer such as data storage and processing. For instance, a program on a PC would send messages to a minicomputer via remote procedure call (RPC) to retrieve relatively small samples from a relatively large dataset. In response, distributed object technology was developed.

Class

edit

A class library contains classes that can be used to create objects. In Java, for example, classes are contained in JAR files and objects are created at runtime from the classes. However, in Smalltalk, a class library is the starting point for a system image that includes the entire state of the environment, classes and all instantiated objects. Most class libraries are stored in a package repository (such as Maven Central for Java). Client code explicitly specifies dependencies to external libraries in build configuration files (such as a Maven Pom in Java).

Remote

edit

A remote library runs on another computer and its assets are accessed via remote procedure call (RPC) over a network. This distributed architecture allows for minimizing installation of the library and support for it on each consuming system and ensuring consistent versioning. A significant downside is that each library call entails significantly more overhead than for a local library.

Runtime

edit

A runtime library provides access to the runtime environment that is available to a program – tailored to the host platform.

Language standard

edit

Many modern programming languages specify a standard library that provides a base level of functionality for the language environment.

Code generation

edit

A code generation library has a high-level API generating or transforming byte code for Java. They are used by aspect-oriented programming, some data access frameworks, and for testing to generate dynamic proxy objects. They also are used to intercept field access.[19]

File naming

edit

Unix-like

edit

On most modern Unix-like systems, library files are stored in directories such as /lib, /usr/lib and /usr/local/lib. A filename typically starts with lib, and ends with .a for a static library (archive) or .so for a shared object (dynamically linked library). For example, libfoo.a and libfoo.so.

Often, symbolic link files are used to manage versioning of a library by providing a link file named without a version that links to a file named with a version. For example, libfoo.so.2 might be version 2 of library foo and a link file named libfoo.so provides a version independent name to that file that programs link to. The link file could be changed to a refer to a version 3 (libfoo.so.3) such that consuming programs will then use version 3 without having to change the program.

Files with extension .la are libtool archives; not usable by the system.

macOS

edit

The macOS system inherits static library conventions from BSD, with the library stored in a .a file. It uses either .so or .dylib for dynamic libraries. Most libraries in macOS, however, consist of "frameworks", placed inside special directories called "bundles" which wrap the library's required files and metadata. For example, a framework called Abc would be implemented in a bundle called Abc.framework, with Abc.framework/Abc being either the dynamically linked library file or a symlink to the dynamically linked library file in Abc.framework/Versions/Current/Abc.

Windows

edit

Often, a Windows dynamic-link library (DLL) has the file extension .dll,[20] although sometimes different extensions are used to indicate general content, e.g. .ocx for a OLE library.

A .lib file can be either a static library or contain the information needed to build an application that consumes the associated DLL. In the latter case, the associated DLL file must be present at runtime.

See also

edit

Notes

edit
  1. ^ It was possible earlier between, e.g., Ada subprograms.

References

edit
  1. ^ Babbage, H. P. (2025-08-07). "The Analytical Engine". Proceedings of the British Association. Bath.
  2. ^ Goldstine, Herman H. (2025-08-07). The Computer from Pascal to von Neumann. Princeton: Princeton University Press. doi:10.1515/9781400820139. ISBN 978-1-4008-2013-9.
  3. ^ Goldstine, Herman; von Neumann, John (1947). Planning and coding of problems for an electronic computing instrument (Report). Institute for Advanced Study. pp. 3, 21–22. OCLC 26239859. it will probably be very important to develop an extensive "library" of subroutines
  4. ^ Wilkes, M. V. (1951). "The EDSAC Computer". 1951 International Workshop on Managing Requirements Knowledge. 1951 International Workshop on Managing Requirements Knowledge. IEEE. p. 79. doi:10.1109/afips.1951.13.
  5. ^ Campbell-Kelly, Martin (September 2011). "In Praise of 'Wilkes, Wheeler, and Gill'". Communications of the ACM. 54 (9): 25–27. doi:10.1145/1995376.1995386. S2CID 20261972.
  6. ^ Wilkes, Maurice; Wheeler, David; Gill, Stanley (1951). The Preparation of Programs for an Electronic Digital Computer. Addison-Wesley. pp. 45, 80–91, 100. OCLC 641145988.
  7. ^ Wexelblat, Richard (1981). History of Programming Languages. ACM Monograph Series. New York, NY: Academic Press (A subsidiary of Harcourt Brace). p. 274. ISBN 0-12-745040-8.
  8. ^ Wexelblat, op. cit., p. 258
  9. ^ Wilson, Leslie B.; Clark, Robert G. (1988). Comparative Programming Languages. Wokingham, England: Addison-Wesley. p. 126. ISBN 0-201-18483-4.
  10. ^ Wilson and Clark, op. cit., p. 52
  11. ^ Wexelblat, op. cit., p. 716
  12. ^ Deshpande, Prasad (2013). Metamorphic Detection Using Function Call Graph Analysis (Thesis). San Jose State University Library. doi:10.31979/etd.t9xm-ahsc.
  13. ^ "Static Libraries". TLDP. Archived from the original on 2025-08-07. Retrieved 2025-08-07.
  14. ^ Kaminsky, Dan (2008). "Chapter 3 - Portable Executable and Executable and Linking Formats". Reverse Engineering Code with IDA Pro. Elsevier. pp. 37–66. doi:10.1016/b978-1-59749-237-9.00003-x. ISBN 978-1-59749-237-9. Retrieved 2025-08-07.
  15. ^ Collberg, Christian; Hartman, John H.; Babu, Sridivya; Udupa, Sharath K. (2003). SLINKY: Static Linking Reloaded. USENIX '05. Department of Computer Science, University of Arizona. Archived from the original on 2025-08-07. Retrieved 2025-08-07.
  16. ^ Levine, John R. (2000). "9. Shared Libraries". Linkers and Loaders. ISBN 1-55860-496-0.
  17. ^ UNIX System V/386 Release 3.2 Programmers Guide, Vol. 1 (PDF). Prentice Hall. 1989. p. 8-2. ISBN 0-13-944877-2.
  18. ^ "Shared Libraries in SunOS" (PDF). pp. 1, 3.
  19. ^ "Code Generation Library". Source Forge. Archived from the original on 2025-08-07. Retrieved 2025-08-07. Byte Code Generation Library is high level API to generate and transform JAVA byte code. It is used by AOP, testing, data access frameworks to generate dynamic proxy objects and intercept field access.
  20. ^ Bresnahan, Christine; Blum, Richard (2025-08-07). LPIC-1 Linux Professional Institute Certification Study Guide: Exam 101-400 and Exam 102-400. John Wiley & Sons (published 2015). p. 82. ISBN 9781119021186. Archived from the original on 2025-08-07. Retrieved 2025-08-07. Linux shared libraries are similar to the dynamic link libraries (DLLs) of Windows. Windows DLLs are usually identified by .dll filename extensions.

Further reading

edit
cindy英文名什么意思 荷花什么时候种植 膑是什么意思 2008年是什么年 水土不服是什么意思
怕是什么生肖 眼睛一直眨是什么原因 富是什么生肖 pouch什么意思 衣原体阴性是什么意思
什么食物降血糖 飞机打多了会有什么严重的后果吗 诺贝尔奖为什么没有数学奖 林五行属什么 粘假牙用什么胶
有机食品什么意思 胁迫是什么意思 口渴喝什么最解渴 可什么意思 皓是什么意思
接骨草长什么样hcv8jop2ns1r.cn 秦始皇原名叫什么名字hcv9jop7ns0r.cn 喉咙干吃什么药hcv8jop3ns9r.cn 小孩肛门瘙痒什么原因hcv8jop3ns1r.cn 什么人不能喝桑黄zsyouku.com
为什么喝绞股蓝会死亡hcv9jop7ns1r.cn 7月22号是什么日子hcv8jop8ns3r.cn 湿气重喝什么茶好hcv9jop8ns3r.cn 两对半是什么意思hcv9jop5ns5r.cn 贝珠是什么hcv8jop9ns6r.cn
大地色眼影是什么颜色hcv7jop5ns1r.cn 结节性红斑是什么病hcv9jop7ns1r.cn 曲安奈德是什么药hcv8jop0ns3r.cn 胎儿颈部可见u型压迹什么意思hcv7jop6ns2r.cn 为什么叫a股hcv7jop5ns2r.cn
阴虚吃什么食补最快hcv8jop6ns4r.cn 公鸡为什么打鸣hcv9jop6ns5r.cn 他喵的什么意思0735v.com 消业障是什么意思hcv7jop5ns1r.cn 强直性脊柱炎挂什么科hcv7jop5ns2r.cn
百度