Is it possible to include dynamic libraries in a static?

Asked

Viewed 42 times

2

The final goal is very complicated, I will try to explain as much as possible :

There is the file libA.so and the file libB.so , both are required to use my own library code libC, which I would like to compile to be static (.a)

It would be possible for me to compile this library and already include the dependencies in it, since they are dynamic ?

1 answer

2


A static library is simply a collection of object files (.o) and is not connected (link). To check this you can run the command ar t <nome-da-biblioteca>.a, that will show you which files .o are included in your static library.

Concluding: Unable to connect static object files or libraries to dynamic libraries.

  • OK thanks .... it seems that unfortunately that’s right

  • If you share more details of your problem in another question we can try to help you.

  • I will try to explain the whole problem in another question

Browser other questions tagged

You are not signed in. Login or sign up in order to post.