Multiple choice technology programming languages

What is a main disadvantage of using statically linked libraries to build software executables?

  1. Linking libraries statically increases executable file size and leads to code redundancy

  2. Without dynamic linking the software cannot take advantage of higher-order functions

  3. The software becomes subject to the linked libraries' license terms which may include usage fees

  4. Lack of proper dynamic linking leads to library proliferation and increased "DLL hell"

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Statically linking libraries embeds all library code directly into the executable at build time, which increases file size significantly compared to dynamic linking where libraries are shared. Every statically linked application contains its own copy of library code, leading to code redundancy across multiple executables. Option B is incorrect - higher-order functions are language concepts unrelated to linking. Option C is wrong - both static and dynamic linking are subject to license terms. Option D describes 'DLL hell' which is a problem with dynamic linking, not static linking.

AI explanation

Static linking copies the actual library code directly into the final executable at build time, so every program that statically links a library carries its own full copy of that code, inflating file size. If many programs on a system statically link the same library, that same code is duplicated across every one of them instead of being shared, which is the main space/redundancy trade-off compared to dynamic linking.