Hannes Domani wrote:
> When I'm trying to (statically) link libpoke into gdb, I get the following 
> errors:
> 
> ... gl-libpoke/xmalloc.c:44: multiple definition of `xmalloc'; alloc.o
> ... gdb/alloc.c:49: first defined here
> 
> Both gdb and gl-libpoke define these x* allocation functions, and I'm not 
> sure how to fix this.

The most reliable way to do this is to rename the said functions at the
source code level, in the scope of poke. That is, in some .h file that
all poke files see but that gdb does not see (such as poke/config.h),
add definitions such as
  #define xmalloc libpoke_xmalloc
  #define xstrdup libpoke_xstrdup.
Most gnulib modules respect such definitions in config.h. If you find
a module that doesn't, please report it here.

For a fixed list of symbols, this can be done through an AH_VERBATIM
invocation in poke's configure.ac.

Bruno




Reply via email to