Is it possible to include dynamic libraries in static?

2

The final goal is quite complicated, I'll try to explain as much as possible:

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

I would like to compile this library and already include in it the dependencies, and are they dynamic?

    
asked by anonymous 25.07.2017 / 13:22

1 answer

2

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

Concluding: can not link object files or static libraries to dynamic libraries.

    
25.07.2017 / 22:51