libtool
[Top][All Lists]
Advanced

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

Circular dependencies between shared libraries, an (icky) use case


From: Simon Richter
Subject: Circular dependencies between shared libraries, an (icky) use case
Date: Tue, 10 Nov 2009 13:41:27 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

Hi,

I have a project with two libraries exposing different levels of detail
to the user, basically one provides (C++) base classes with some
functionality, and the other one provides classes derived from those
with the actual implementation.

Since the latter is going to change often, I'd rather not expose the
derived interface to anyone who doesn't need it, to save me from
rebuilding and relinking all applications and bumping SONAME all of the
time.

Now, the two libraries, let's call them libbase and libderived, have
mutual references: libbase needs to call into libderived to construct
the actual object, and libderived needs to call into libbase for
functions that are implemented in the base classes but called from the
derived ones.

The desired result is that applications that are content with the base
interface can link against libbase and ignore libderived, and
applications that require full access to the derived interface link
against both libraries. When the derived interface changes, I can then
bump the SONAME of libderived, and rebuild libbase and all apps that
directly link against libderived, and get back to a consistent set.

Is something like this possible using libtool, and if so, can it be done
portably?

   Simon

Attachment: signature.asc
Description: Digital signature


reply via email to

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