Unix/Linux programming Question:
What are the differences between Shared and Dynamic libraries?
Answer:
There are two ways in which a library is shared. Static and dynamic
In statically linked library the code of library is referenced at compile time and the result executable will be bigger.
I dynamically linked libraries the code of library is referenced at run time and resulting executable will be smaller. But drwaback is that at run time this will need the library to reference the library related symbols.
In statically linked library the code of library is referenced at compile time and the result executable will be bigger.
I dynamically linked libraries the code of library is referenced at run time and resulting executable will be smaller. But drwaback is that at run time this will need the library to reference the library related symbols.
Previous Question | Next Question |
How would you create shared and dynamic libraries? | Give examples of how memory leaks can occur with c programs? |