Circular Dependency - Linux

This is a discussion on Circular Dependency - Linux ; Hi, I have two libraries libA and libB, both of them are dependent on each other for certian symbols which is creating a circular dependency among libraries. I want to remove this circular dependency and understand that i need to ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Circular Dependency

  1. Circular Dependency

    Hi,

    I have two libraries libA and libB, both of them are dependent on
    each other for certian symbols which is creating a circular dependency
    among libraries.

    I want to remove this circular dependency and understand that i need
    to generate a stub file to help counter this dependency.

    I tried searching but i cont find any information as to how to
    generate a stub library file in linux.

    Please note that my libA and libB are both shared library file.

    Can any one please tell me how to generate stub files to solve my
    dependency issues.

    Newbei


  2. Re: Circular Dependency

    In message <1174995774.021735.204400@o5g2000hsb.googlegroups.c om>, newbei
    wrote:

    > Hi,
    >
    > I have two libraries libA and libB, both of them are dependent on
    > each other for certian symbols which is creating a circular dependency
    > among libraries.


    Try specifying the first library twice when you link, e.g.

    gcc -o my_prog my_prog.o -lA -lB -lA

    The second usage of -lA is there to resolve any dangling dependencies from
    the -lB option.

    --
    Regards

    Dave [RLU#314465]
    ================================================== ====
    dwnoon@spamtrap.ntlworld.com (David W Noon)
    Remove spam trap to reply via e-mail.
    ================================================== ====


  3. Re: Circular Dependency

    "newbei" writes:

    > Hi,
    >
    > I have two libraries libA and libB, both of them are dependent on
    > each other for certian symbols which is creating a circular dependency
    > among libraries.


    Without more detail, I'd say the libraries should probably be merged
    into one or refactored.

    --
    Måns Rullgård
    mans@mansr.com

+ Reply to Thread