[Top][All Lists]

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

Common Source code

From: Paulo J. Matos
Subject: Common Source code
Date: Wed, 10 May 2006 21:10:06 +0100

Hi all,

I have a source tree, which is maintained with autotools. It goes
something like this:
 |- lib
      |- lib1
      |- lib2
 |- src

lib1 and lib2 are compiled and then linked to the src software.
However, I've just developed a logger utility interface which uses
log4cpp and I would like this interface to be shared between lib1,
lib2 and src so that logging is possible in a uniform way in all my
source code. Code duplication doesn't seem to be a solution at all.
I see two ways: Creating yet another library and then link it with
lib1 and lib2 and later link to the main code lib1, lib2 and
liblogger. Or create a directory of shared code with the logger
interface and compile it with lib1, lib2 and the main code directly.
Still, these solutions rise a question, won't I get duplicate
identifiers in the end?

Any ideas on this will be greatly appreciated.

Paulo Jorge Matos - pocm at sat inesc-id pt
Computer and Software Engineering

reply via email to

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