using shared libraries

Q1) if a shared library is used by a program, them the shared library must be installed on the host where the application is to be run, am I correct?
Q2) If Q1 is correct then what would happen if the shared library is not present and the program is run?
Last edited on
1. Yes.
2. You will get errors when you attempt to launch the program.

You'll need the shared library for linking too.
then if I statically link the library code into my own program, do I still need to have the shared library installed on the host where the application is to be run? Can the program then be run standalone without any dependencies?
Last edited on
If the library provides both a shared object and a statically linkable library, then if you statically link you
will not require the shared object at runtime.
Topic archived. No new replies allowed.