Solved/Closed What Is Static Linking And Dynamic Linking?


In operating systems exists static and dynamic linking. When a program uses static linking, the task of linking libraries to the program is done in compilation time, so the binary image of these program includes the library linking that will use. Otherwise, in a dynamic linking model, the program will link the libraries that it needs at the run time, so with this model, the program will have the ability to choose with a library to use at runtime. I.e. in most common .net programs the external libraries (DLLs) are linked at run-time, so you will have the possibility to update one of these dlls if the dlls interface definition keeps as oldest. The common use can be with a new dll version that solves some bugs or improves performance issues.


Well-Known Member
Static linking is the process of copying all library modules used in the program into the final executable image.
In dynamic linking the names of the external libraries are placed in the final executable file while the actual linking takes place at run time when both executable file and libraries are placed in the memory.