0
votes

Are there any differences between the way static and shared libraries are put together? For example, could code from a shared library be loaded into an executable at compile/link-time rather than at runtime, just like a static library?

1
possible duplicate of Difference between static and shared libraries?user166390

1 Answers

2
votes

Are there any differences between the way static and shared libraries are put together?

Absolutely; they are very different animals. One major difference is that with archive library, you link in only what you use, but with shared library you get the entire thing.

could code from a shared library be loaded into an executable at compile/link-time rather than at runtime

Not easily, but tools do exist.

just like a static library

I wouldn't call it "just like a static library" -- the mechanics and the end result are very different.