automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Circular dependencies and test programs


From: Bob Friesenhahn
Subject: Re: Circular dependencies and test programs
Date: Sat, 20 Oct 2007 14:43:32 -0500 (CDT)

On Sat, 20 Oct 2007, Michael B Allen wrote:

I have two libraries liba and libb. I would like liba to call a
function in libb but libb is linked with liba. So I have a circular
dependency. Normally this is not a problem because the linker doesn't
try to resolve dependencies when linking libraries.

My best advice is to change the design of your libraries to avoid the circular dependencies. On some platforms the linker must resolve all dependencies when linking libraries. Circular dependencies are sure-fire headache in otherwise portable software.

In some cases a link can succeed by listing dependency libraries several times.

Even once you fix the circular dependency issue, you will still need to worry about library build order since Automake will need to build and install libraries in the correct order.

Bob
======================================
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]