On Feb 13, 2007, at 7:41 PM, Geoffrey Biggs wrote:
> I'm trying to use a couple of functions from interface_utils (part of
> libplayercore currently) in libplayerc.
Your trouble was probably resulting from the functions having their
names mangled by g++. The interface_util.cc code is really just C,
so I've renamed it to interface_util.c and put extern "C" protection
into interface_util.h. Note that after updating, you should delete
libplayercore/.deps and then re-configure to get rid of stale
dependencies on interface_util.cc.
Now you have two options:
(1) Include the interface_utils code into libplayerc. To do this,
add $(top_builddir)/libplayercore/interface_util.lo to the _LDFLAGS
and _DEPENDENCIES variables in the libplayerc Makefile.am.
(2) Create a separate lib in libplayercore from interface_util.[c,h],
and change pkg-config descriptions (of libplayercore, libplayerc,
maybe others) to depend on the new package.
If you think users of libplayerc will want to directly call functions
in interface_util.c, then (2) is cleaner. If you only want to use
them internally in libplayerc, then (1) is easier.