Static vs Dynamic Linking
This cluster debates the pros and cons of static versus dynamic linking in software compilation, particularly challenges with C/C++ libraries like glibc and GTK+, memory usage, dependencies, and feasibility for distribution.
Activity Over Time
Top Contributors
Keywords
Sample Comments
Considering the complexity that shared libraries add over static linking: yes absolutely.
Static linking is not easily available with C/C++ in the general case. Some libraries support it, some important ones like Glibc and GTK+ do not.
Has static linking gone too far?
Isn't it possible to statically link C libraries too?
The standard library can be statically linked...
Bare in mind it's statically linked also, so it doesn't need to read a bunch of dynamic libraries from disk.
Linking everything statically is not always an advantage...
You can't static link glibc, so our static binaries still have a dynamic dependency on it.
Then don't statically link? What's the problem?
Only as long as you use static linking.