top | item 40261002

(no title)

sqrt_1 | 1 year ago

If you are thinking about the C runtime on Windows, you can statically link those dlls into your program via compile time options.

There are valid reasons for dlls however. The main one being symbol name collision.

For example, you can use a dll that links to version 1 of a library, while using version 2 of the library yourself without having any name collisions.

Many years ago when I did Linux development this was a main gripe of using .so files - imported names could clash with the same global names in your program and you get random runtime behaviour.

discuss

order

sqrt_1|1 year ago

And the other reason for dlls for common system libraries, security. If a security bug is found in a dll that is shared amongst a lot of programs, that can be updated without having to recompile all the programs.