[BGL] graphviz imcompatible with dijkstra_shortest_paths

Hello, I try to use graphviz. But when I add "#include <boost/graph/graphviz.hpp>" to the example "http://www.boost.org/doc/libs/1_53_0/libs/graph/example/dijkstra-example.cpp", I get a compilation error. I use boost 1.53 and vs2012 express with command line option "/link libboost_graph-vc110-s-1_53.lib libboost_regex-vc110-s-1_53.lib". The error is about the deducation of template parameter of EdgeIndex boost::detail::get(const boost::detail::csr_edge_index_map<Vertex,EdgeIndex> &,const boost::detail::csr_edge_descriptor<Vertex,EdgeIndex> &) in "boost/graph/dijkstra_shortest_paths.hpp(140)". Thank you! Regards, YaoYuan

On Wed, 1 May 2013, YaoYuan wrote:
Hello,
I try to use graphviz. But when I add "#include <boost/graph/graphviz.hpp>" to the example "http://www.boost.org/doc/libs/1_53_0/libs/graph/example/dijkstra-example.cpp", I get a compilation error.
I use boost 1.53 and vs2012 express with command line option "/link libboost_graph-vc110-s-1_53.lib libboost_regex-vc110-s-1_53.lib". The error is about the deducation of template parameter of
EdgeIndex boost::detail::get(const boost::detail::csr_edge_index_map<Vertex,EdgeIndex> &,const boost::detail::csr_edge_descriptor<Vertex,EdgeIndex> &)
in "boost/graph/dijkstra_shortest_paths.hpp(140)".
I'm not able to reproduce the error on GCC. Could you please send the entire error message? Thanks. -- Jeremiah Willcock

Thank you! Following is the error translated by google: boost / graph / dijkstra_shortest_paths.hpp (140): error C2784: "EdgeIndex boost :: detail :: get (const boost :: detail :: csr_edge_index_map <Vertex,EdgeIndex> &, const boost :: detail :: csr_edge_descriptor <Vertex,EdgeIndex> &) ": failed from" int * "" const boost :: detail :: csr_edge_index_map <Vertex,EdgeIndex> & "deduced template parameter boost / graph / detail / compressed_sparse_row_struct.hpp (68): see "boost :: detail :: get" statement boost / graph / breadth_first_search.hpp (88): see being compiled function template instantiation "void boost :: detail :: dijkstra_bfs_visitor <UniformCostVisitor, UpdatableQueue, WeightMap, PredecessorMap, DistanceMap, BinaryFunction , BinaryPredicate> :: gray_target <boost :: detail :: edge_desc_impl <Directed,Vertex>, const IncidenceGraph> (Edge, Graph &) "reference with [ UniformCostVisitor = boost :: dijkstra_visitor <>, UpdatableQueue = MutableQueue, WeightMap = boost :: adj_list_edge_property_map <boost :: directed_tag, int, const int &, unsigned int, const boost :: property <boost::edge_weight_t,int>, boost :: edge_weight_t>, PredecessorMap = unsigned int *, DistanceMap = int *, BinaryFunction = boost :: closed_plus <D>, BinaryPredicate = std :: less <D>, Directed = boost :: directed_tag, Vertex = unsigned int, IncidenceGraph = graph_t, Edge = boost :: detail :: edge_desc_impl <boost::directed_tag,unsigned int>, Graph = graph_t ] boost / graph / breadth_first_search.hpp (88): see being compiled function template instantiation "void boost :: detail :: dijkstra_bfs_visitor <UniformCostVisitor, UpdatableQueue, WeightMap, PredecessorMap, DistanceMap, BinaryFunction , BinaryPredicate> :: gray_target <boost :: detail :: edge_desc_impl <Directed,Vertex>, const IncidenceGraph> (Edge, Graph &) "reference with [ UniformCostVisitor = boost :: dijkstra_visitor <>, UpdatableQueue = MutableQueue, WeightMap = boost :: adj_list_edge_property_map <boost :: directed_tag, int, const int &, unsigned int, const boost :: property <boost::edge_weight_t,int>, boost :: edge_weight_t>, PredecessorMap = unsigned int *, DistanceMap = int *, BinaryFunction = boost :: closed_plus <D>, BinaryPredicate = std :: less <D>, Directed = boost :: directed_tag, Vertex = unsigned int, IncidenceGraph = graph_t, Edge = boost :: detail :: edge_desc_impl <boost::directed_tag,unsigned int>, Graph = graph_t ] boost / graph / breadth_first_search.hpp (105): see reference to function template being compiled instantiate void boost :: breadth_first_visit <IncidenceGraph,Buffer,BFSVisitor,ColorMap,unsigned int*> (const IncidenceGraph &, SourceIterator, SourceIterator, Buffer &, BFSVisitor, ColorMap) "reference with [ IncidenceGraph = graph_t, Buffer = MutableQueue, BFSVisitor = boost :: detail :: dijkstra_bfs_visitor <boost :: dijkstra_visitor <>, MutableQueue, boost :: adj_list_edge_property_map <boost :: directed_tag, int, const int &, unsigned int, const boost :: property <boost :: edge_weight_t, int >, boost :: edge_weight_t>, unsigned int *, int *, boost :: closed_plus <D>, std :: less <D>>, ColorMap = boost :: two_bit_color_map <boost :: vec_adj_list_vertex_id_map <boost::no_property,unsigned int>>, SourceIterator = unsigned int * ] boost / graph / dijkstra_shortest_paths.hpp (333): see reference to function template being compiled instance of "void the boost :: breadth_first_visit <Graph MutableQueue, boost :: detail :: dijkstra_bfs_visitor <UniformCostVisitor UpdatableQueue, WeightMap, PredecessorMap, DistanceMap, BinaryFunction, BinaryPredicate>, ColorMap> (const IncidenceGraph &, unsigned int, Buffer &, BFSVisitor, ColorMap) "reference with [ Graph = graph_t, UniformCostVisitor = boost :: dijkstra_visitor <>, UpdatableQueue = MutableQueue, WeightMap = boost :: adj_list_edge_property_map <boost :: directed_tag, int, const int &, unsigned int, const boost :: property <boost::edge_weight_t,int>, boost :: edge_weight_t>, PredecessorMap = unsigned int *, DistanceMap = int *, BinaryFunction = boost :: closed_plus <D>, BinaryPredicate = std :: less <D>, ColorMap = boost :: two_bit_color_map <boost :: vec_adj_list_vertex_id_map <boost::no_property,unsigned int>>, IncidenceGraph = graph_t, Buffer = MutableQueue, BFSVisitor = boost :: detail :: dijkstra_bfs_visitor <boost :: dijkstra_visitor <>, MutableQueue, boost :: adj_list_edge_property_map <boost :: directed_tag, int, const int &, unsigned int, const boost :: property <boost :: edge_weight_t, int >, boost :: edge_weight_t>, unsigned int *, int *, boost :: closed_plus <D>, std :: less <D>> ] boost / graph / dijkstra_shortest_paths.hpp (385): see being compiled function template instantiation "void boost :: dijkstra_shortest_paths_no_init <VertexListGraph, DijkstraVisitor, PredecessorMap, DistanceMap, WeightMap, IndexMap, Compare, Combine, DistZero, ColorMap> (const Graph &, unsigned int, PredecessorMap, DistanceMap, WeightMap, IndexMap, Compare, Combine, DistZero, DijkstraVisitor, ColorMap) "reference with [ VertexListGraph = graph_t, DijkstraVisitor = boost :: dijkstra_visitor <>, PredecessorMap = unsigned int *, DistanceMap = int *, WeightMap = boost :: adj_list_edge_property_map <boost :: directed_tag, int, const int &, unsigned int, const boost :: property <boost::edge_weight_t,int>, boost :: edge_weight_t>, IndexMap = boost :: vec_adj_list_vertex_id_map <boost::no_property,unsigned int>, Compare = std :: less <D>, Combine = boost :: closed_plus <D>, DistZero = std :: numeric_limits <int> :: _Ty, ColorMap = boost :: two_bit_color_map <boost :: vec_adj_list_vertex_id_map <boost::no_property,unsigned int>>, Graph = graph_t ] boost / graph / dijkstra_shortest_paths.hpp (356): see being compiled function template instantiation "void boost :: dijkstra_shortest_paths <VertexListGraph, DijkstraVisitor, PredecessorMap, DistanceMap, WeightMap, IndexMap, Compare, Combine, DistInf, DistZero, boost :: two_bit_color_map <IndexMap>> (const VertexListGraph &, unsigned int, PredecessorMap, DistanceMap, WeightMap, IndexMap, Compare, Combine, DistInf, DistZero, DijkstraVisitor, ColorMap) "reference with [ VertexListGraph = graph_t, DijkstraVisitor = boost :: dijkstra_visitor <>, PredecessorMap = unsigned int *, DistanceMap = int *, WeightMap = boost :: adj_list_edge_property_map <boost :: directed_tag, int, const int &, unsigned int, const boost :: property <boost::edge_weight_t,int>, boost :: edge_weight_t>, IndexMap = boost :: vec_adj_list_vertex_id_map <boost::no_property,unsigned int>, Compare = std :: less <D>, Combine = boost :: closed_plus <D>, DistInf = D DistZero = std :: numeric_limits <int> :: _Ty, ColorMap = boost :: two_bit_color_map <boost :: vec_adj_list_vertex_id_map <boost::no_property,unsigned int>> ] boost / graph / dijkstra_shortest_paths.hpp (440): see reference to function template being compiled instantiate void boost :: the dijkstra_shortest_paths <VertexListGraph, Default, P, the DistanceMap the WeightMap IndexMap, std: : less <_Ty>, boost :: closed_plus <T>, D, int, int *, boost :: vertex_distance_t, boost :: bgl_named_params <unsigned int *,Tag,Base>> (const VertexListGraph &, unsigned int, PredecessorMap, DistanceMap, WeightMap, IndexMap, Compare, Combine, DistInf, DistZero, DijkstraVisitor, const boost :: bgl_named_params <int *, boost :: vertex_distance_t, boost :: bgl_named_params <unsigned int *,Tag,Base>> &, boost :: graph :: detail :: no_parameter) reference with [ VertexListGraph = graph_t, Default = boost :: dijkstra_visitor <>, P = unsigned int *, DistanceMap = int *, WeightMap = boost :: adj_list_edge_property_map <boost :: directed_tag, int, const int &, unsigned int, const boost :: property <boost::edge_weight_t,int>, boost :: edge_weight_t>, IndexMap = boost :: vec_adj_list_vertex_id_map <boost::no_property,unsigned int>, _Ty = D T = D Tag = boost :: vertex_predecessor_t, Base = the boost :: no_property, PredecessorMap = unsigned int *, Compare = std :: less <D>, Combine = boost :: closed_plus <D>, DistInf = D DistZero = std :: numeric_limits <int> :: _Ty, DijkstraVisitor = boost :: dijkstra_visitor <> ] boost / graph / dijkstra_shortest_paths.hpp (462): see being compiled function template instantiation "void boost :: detail :: dijkstra_dispatch2 <VertexListGraph,P,WeightMap,IndexMap,Params> ( const VertexListGraph &, unsigned int, DistanceMap, WeightMap, IndexMap, const Params &) "reference with [ VertexListGraph = graph_t, P = int *, WeightMap = boost :: adj_list_edge_property_map <boost :: directed_tag, int, const int &, unsigned int, const boost :: property <boost::edge_weight_t,int>, boost :: edge_weight_t>, IndexMap = boost :: vec_adj_list_vertex_id_map <boost::no_property,unsigned int>, Params = boost :: bgl_named_params <int *, boost :: vertex_distance_t, boost :: bgl_named_params <unsigned int *,boost::vertex_predecessor_t,boost::no_property>>, DistanceMap = int * ] boost / graph / dijkstra_shortest_paths.hpp (481): see being compiled function template instantiation "void boost :: detail :: dijkstra_dispatch1 <VertexListGraph, int *, boost :: and adj_list_edge_property_map <Directed , Value, Ref, Vertex, Property, Tag>, boost :: vec_adj_list_vertex_id_map <boost::no_property,Vertex>, boost :: bgl_named_params <T,boost::vertex_distance_t,Base>> (const VertexListGraph &, unsigned int, DistanceMap, WeightMap, IndexMap, const Params &) "reference with [ VertexListGraph = graph_t, Directed = boost :: directed_tag, Value = int Ref = const int &, Vertex = unsigned int, Property = const boost :: property <boost::edge_weight_t,int>, Tag = boost :: edge_weight_t, T = int *, Base = boost :: bgl_named_params <unsigned int *,boost::vertex_predecessor_t,boost::no_property>, DistanceMap = int *, WeightMap = boost :: adj_list_edge_property_map <boost :: directed_tag, int, const int &, unsigned int, const boost :: property <boost::edge_weight_t,int>, boost :: edge_weight_t>, IndexMap = boost :: vec_adj_list_vertex_id_map <boost::no_property,unsigned int>, Params = boost :: bgl_named_params <int *, boost :: vertex_distance_t, boost :: bgl_named_params <unsigned int *,boost::vertex_predecessor_t,boost::no_property>> ] ***.cpp (60): see reference to function template being compiled examples of "void boost :: dijkstra_shortest_paths <graph_t, int *, boost :: vertex_distance_t, boost :: bgl_named_params <T,Tag,Base>> (const VertexListGraph &, unsigned int, const boost :: bgl_named_params <int *, boost :: vertex_distance_t, boost :: bgl_named_params <T,Tag,Base>> &) "reference with [ T = unsigned int *, Tag = boost :: vertex_predecessor_t, Base = the boost :: no_property, VertexListGraph = graph_t ] boost / graph / detail / compressed_sparse_row_struct.hpp (68): see "boost :: detail :: get" statement 在 Wed, 01 May 2013 22:19:45 +0800,Jeremiah Willcock <jewillco@osl.iu.edu> 写道:
On Wed, 1 May 2013, YaoYuan wrote:
Hello,
I try to use graphviz. But when I add "#include <boost/graph/graphviz.hpp>" to the example "http://www.boost.org/doc/libs/1_53_0/libs/graph/example/dijkstra-example.cpp", I get a compilation error.
I use boost 1.53 and vs2012 express with command line option "/link libboost_graph-vc110-s-1_53.lib libboost_regex-vc110-s-1_53.lib". The error is about the deducation of template parameter of
EdgeIndex boost::detail::get(const boost::detail::csr_edge_index_map<Vertex,EdgeIndex> &,const boost::detail::csr_edge_descriptor<Vertex,EdgeIndex> &)
in "boost/graph/dijkstra_shortest_paths.hpp(140)".
I'm not able to reproduce the error on GCC. Could you please send the entire error message? Thanks.
-- Jeremiah Willcock _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

On Thu, 2 May 2013, YaoYuan wrote:
Thank you! Following is the error translated by google:
It looks like you might be hitting something related to <URL:https://svn.boost.org/trac/boost/ticket/7877>. It should be fixed on the trunk but the change did not get into the release branch yet. Could you please try adding the Graphviz include to: https://svn.boost.org/svn/boost/trunk/libs/graph/example/dijkstra-example.cp... and see if that works better? Thanks. -- Jeremiah Willcock

It works now. Thank you for your help. 在 Thu, 02 May 2013 11:00:54 +0800,Jeremiah Willcock <jewillco@osl.iu.edu> 写道:
On Thu, 2 May 2013, YaoYuan wrote:
Thank you! Following is the error translated by google:
It looks like you might be hitting something related to <URL:https://svn.boost.org/trac/boost/ticket/7877>. It should be fixed on the trunk but the change did not get into the release branch yet. Could you please try adding the Graphviz include to:
https://svn.boost.org/svn/boost/trunk/libs/graph/example/dijkstra-example.cp...
and see if that works better? Thanks.
-- Jeremiah Willcock _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Jeremiah Willcock
-
YaoYuan