Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Shared library
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Library types == A program that is configured to use a library can use either [[Static linking|static-linking]] or [[Dynamic linker|dynamic-linking]]. Historically, libraries could only be static.<ref>{{Cite web |date=2018-10-25 |title=Difference between Static and Shared libraries |url=https://www.geeksforgeeks.org/difference-between-static-and-shared-libraries/ |access-date=2025-02-02 |website=GeeksforGeeks |language=en-US}}</ref> For static-linking ([[.lib]]), the library is effectively embedded into the programs executable file, while for dynamic-linking the library can be [[Load time|loaded]] at [[Runtime (program lifecycle phase)|runtime]] from a shared location, such as [[System file|system files]]. A program requires a [[compiler]] and [[Linker (computing)|linker]] step to access a library. In static-linking, those references are fully resolved at compile-time,<ref>{{Cite web |last=Microsoft |date=2021-10-29 |title=Walkthrough: Create and use a static library (C++) |url=https://learn.microsoft.com/en-us/cpp/build/walkthrough-creating-and-using-a-static-library-cpp?view=msvc-170 |access-date=2025-02-01 |website=learn.microsoft.com |language=en-us |quote=Using a static library is a great way to reuse code. Rather than reimplementing the same routines in every app that requires the functionality, you write them one time in a static library and then reference it from the apps. Code linked from a static library becomes part of your appโyou don't have to install another file to use the code.}}</ref> whereas in dynamic-linking those references are not fully resolved until runtime by the [[operating system]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)