Vineet1982
Vineet1982

Reputation: 7918

Autotools: Is it possible to do Cross Linking of Shared Libraries

I may be stupid but thinking that is it possible to do Cross Linking:

                               Lib A                            Lib A1
===========   Calling Func A ===========  A calls Func A1   =============
| EXE File |   ===>          |  Func A |   ============>    | Func A1    |
===========                  |  Func B |   A1 calls fun B   =============
                             ===========   <===========     

EXE and Both Library are Under Development.

If possible then how to do?

Upvotes: 1

Views: 194

Answers (1)

DanielKO
DanielKO

Reputation: 4527

EDIT: I decided to completely remove my previous answer, after I researched and found evidence on both the libtool manual and the mailing list recommending against it.

Yes, you can have libraries depending on each other. You might end up with only static libraries (where it's ok to have undefined symbols), as not all platforms fully support cyclic dependencies on shared libraries.

Libtool has some code to handle complex dependency for shared libraries, but it's not fully ported to all platforms; you'll end up with the more conservative implementation (static libraries) even if you pass in --disable-static --enable-shared.

Upvotes: 1

Related Questions