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);
 

However, the test code graphviz.cpp, which has the lines:

  std::ifstream in(filename.c_str());
  BOOST_REQUIRE(in);

  Graph g;
  dynamic_properties dp;
  dp.property("id", get(vertex_name, g));
  dp.property("weight", get(edge_weight, g));
  BOOST_CHECK(read_graphviz(in, g, dp, "id"));

compiles, links, and runs just fine.

I also tried (desperation) building an earlier version of boost -- 1.34.1 -- with the same results.

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.
 
Andrew Sutton
andrew.n.sutton@gmail.com