Vladislav Gusak
Vladislav Gusak

Reputation: 23

How to make shared library with all dependencies inside?

I'm trying to build shared library libglog.so from next link But can't create shared library that has all dependencies inside I have used -static(this one is also used in make build), but ldd is showing that library depends on some standard libraries

Also I know that libc cannot be linked staticly, how to change glibc to musl libc in autoconf?

What can I do?

Upvotes: 1

Views: 234

Answers (1)

Maxim Egorushkin
Maxim Egorushkin

Reputation: 136208

An alternative to linking statically is to use Exodus which packs your executables into one self-contained directory with all the shared libraries required. Such a directory can be deployed on any Linux and even into Windows WSL, without having to use Docker or containers.

Linking statically requires deep understanding of the linking process and its intricacies. Some libraries cannot be linked statically for different reasons.

Upvotes: 1

Related Questions