
On Jan 7, 2009, at 6:55 AM, Andrew Sutton wrote:
I have been working through the tutorial portion of "The Boost Graph Library: User Guide and Reference Manual", and have been unable to get example code that includes calls to read_graphviz to link. For example, code including this line:
read_graphviz("figs/ospf-graph.dot", g_dot);
<...>
Any ideas what I'm missing and how I might fix it, or what I need to read to find out, would be appreciated.
I remember having similar problems last time I tried to use the graphviz stuff. Basically, the "parameter-extracting" version that you're calling instantiates a function that doesn't really exist, hence the linker error. You have to be more very specific when calling read_graphviz. and pass in the istream and a dynamic_properties object. I think you can omit the "id" string. I think that gave me some problems too.
Turns out the answer I looked at this and yet missed it: // Deprecated GraphViz readers void read_graphviz(const std::string& file, GraphvizDigraph& g); void read_graphviz(FILE* file, GraphvizDigraph& g); void read_graphviz(const std::string& file, GraphvizGraph& g); void read_graphviz(FILE* file, GraphvizGraph& g); http://www.boost.org/doc/libs/1_37_0/libs/graph/doc/read_graphviz.html Doh! Mystery solved. -- Michael