linking inter dependent libraries

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rsennat
    New Member
    • Dec 2007
    • 14

    linking inter dependent libraries

    Hi,
    what is the order of the libraries in the Makefile, for linking inter dependent libraries. i'm getting linker error for the following scenario.

    I have lib1.a and lib2.a, with which lib1.a needs lib2.a and lib2.a needs lib1.a for linking. How can this be resolved.

    any thoughts on this would be helpful.

    thanks
    rsennat
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by rsennat
    Hi,
    what is the order of the libraries in the Makefile, for linking inter dependent libraries. i'm getting linker error for the following scenario.

    I have lib1.a and lib2.a, with which lib1.a needs lib2.a and lib2.a needs lib1.a for linking. How can this be resolved.

    any thoughts on this would be helpful.

    thanks
    rsennat
    That's the old unix gotcha; either run [b]ranlib]/b] on both libraries or add lib1.a
    again on the command line, i.e. lib1.a lib2.a lib1.a

    kind regards,

    Jos

    Comment

    Working...