Boost logo

Boost :

From: raphael.bossek_at_[hidden]
Date: 2001-04-08 05:09:52


hi all,

I'm working at the moment on a Debian GNU/Linux package for Boost.org
libraries and have had to realise that it is not possible to build a
shared library of GRAPH because of multiple definitions of members
comming from namespace graphviz! The graphviz_parserver.cpp file will
be compiled twice with different GRAPHVIZ_GRAPH values so
graphviz_graph_parser.o (GRAPHVIZ_GRAPH=boost::GraphvizGraph) and
graphviz_digraph_parser.o (GRAPHVIZ_GRAPH=boost::GraphvizDigraph) are
created. Because this two object files are linked together to one
library (static or shared) and the GRAPHVIZ_GRAPH value does not
influence the namespace graphviz from graphviz_parser.cpp all "global"
members defined within the namespace graphviz exist twice for the
library and the linker breaks!
The problem can be seen while compiling a shared library using the
follwing call:

STATIC_OBJS = static/graphviz_lex.o static/graphviz_digraph_parser.o
static/graphviz_graph_parser.o

libbgl-viz.so:
$(subst static,dynamic,$(STATIC_OBJS))
        $(CXX) -shared -Wl,-soname -Wl,$@.$(GRAPH_SONAME_VERSION) -o
$@.$(GRAPH_SONAME_VERSION) $^
        ln -s $@.$(GRAPH_SONAME_VERSION) $@

--
Raphael Bossek

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk