I don't quite understand how the compilation of a library that uses another library work. From what I understand the is 4 cases :
1) Compiling a static library (A) that uses a static library (B) : The compilation would work, but linking against library A would not work because a static library is just an archive containing the .o files resulting from the compilation of A, and not from B. Is it true that when creating a static library, the compilation phase searches for function definition and find them in the header. At the linking phase, the compiler searches for function implementations in the library B and the compilation is successful if it finds them but it doesn't actually put the function implementations in the static library A. And that's why when linking against A it doesn't work
2) Compiling a static library that uses a dynamic library : I think both the creation of A and the use of A would work, but why is that? What does the compiler actually put in the dlls/so?
3) Compiling a dynamic library that uses a static library : Would this work?
4) Compiling a dynamic library that uses another dynamic library : Would this work too?
Thanks for your time.