1.

What Is The Difference Between Static Linking And Dynamic Linking ?

Answer»

In STATIC linking, all the library modules used in the program are placed in the final executable file MAKING it larger in size. This is done by the linker. If the modules used in the program are MODIFIED after linking, then re-compilation is needed. The advantage of static linking is that the modules are present in an executable file. We don't want to worry about COMPATIBILITY issues.

In case of dynamic linking, only the names of the module used are present in the executable file and the actual linking is done at run time when the program and the library modules both are present in the memory. That is why, the executables are smaller in size. Modification of the library modules used does not force re-compilation. But dynamic linking MAY face compatibility issues with the library modules used.

In static linking, all the library modules used in the program are placed in the final executable file making it larger in size. This is done by the linker. If the modules used in the program are modified after linking, then re-compilation is needed. The advantage of static linking is that the modules are present in an executable file. We don't want to worry about compatibility issues.

In case of dynamic linking, only the names of the module used are present in the executable file and the actual linking is done at run time when the program and the library modules both are present in the memory. That is why, the executables are smaller in size. Modification of the library modules used does not force re-compilation. But dynamic linking may face compatibility issues with the library modules used.



Discussion

No Comment Found