
All, First, I'm very new to boost and BGL, so please forgive me if this is trivial. I've created a graph (adjacency_list) using bundled properties and am now trying to write it as a dot file. I've written my property writer, but when I compile, I get several of: /usr/include/boost/graph/graphviz.hpp: In function `void boost::write_graphviz(std::ostream&, const Graph&, VertexPropertiesWriter, EdgePropertiesWriter, GraphPropertiesWriter, VertexID) [with Graph = boost::adjacency_list<boost::listS, boost::listS, boost::undirectedS, map::place, map::link, boost::no_property, boost::listS>, VertexPropertiesWriter = map::placeWriter, EdgePropertiesWriter = boost::default_writer, GraphPropertiesWriter = boost::default_writer, VertexID = boost::adj_list_vertex_property_map<boost::adjacency_list<boost::listS, boost::listS, boost::undirectedS, map::place, map::link, boost::no_property, boost::listS>, boost::detail::error_property_not_found, const boost::detail::error_property_not_found&, boost::vertex_index_t>]': /usr/include/boost/graph/graphviz.hpp:260: instantiated from `void boost::write_graphviz(std::ostream&, const Graph&, VertexPropertiesWriter, EdgePropertiesWriter, GraphPropertiesWriter) [with Graph = boost::adjacency_list<boost::listS, boost::listS, boost::undirectedS, map::place, map::link, boost::no_property, boost::listS>, VertexPropertiesWriter = map::placeWriter, EdgePropertiesWriter = boost::default_writer, GraphPropertiesWriter = boost::default_writer]' /usr/include/boost/graph/graphviz.hpp:278: instantiated from `void boost::write_graphviz(std::ostream&, const Graph&, VertexWriter) [with Graph = map::mapType, VertexWriter = map::placeWriter]' topologicalMap.h:282: instantiated from here /usr/include/boost/graph/graphviz.hpp:241: error: no match for 'operator<<' in 'out << boost::get [with PropertyMap = boost::adj_list_vertex_property_map<boost::adjacency_list<boost::listS, boost::listS, boost::undirectedS, map::place, map::link, boost::no_property, boost::listS>, boost::detail::error_property_not_found, const boost::detail::error_property_not_found&, boost::vertex_index_t>, Reference = const boost::detail::error_property_not_found&, K = void*](((const boost::put_get_helper<const boost::detail::error_property_not_found&, boost::adj_list_vertex_property_map<boost::adjacency_list<boost::listS, boost::listS, boost::undirectedS, map::place, map::link, boost::no_property, boost::listS>, boost::detail::error_property_not_found, const boost::detail::error_property_not_found&, boost::vertex_index_t> >&)((const boost::put_get_helper<const boost::detail::error_property_not_found&, boost::adj_list_vertex_property_map<boost::adjacency_list<boost::listS, boost::listS, boost::undirectedS, map::place, map::link, boost::no_property, boost::listS>, boost::detail::error_property_not_found, const boost::detail::error_property_not_found&, boost::vertex_index_t> >*) ((boost::put_get_helper<const boost::detail::error_property_not_found&, boost::adj_list_vertex_property_map<boost::adjacency_list<boost::listS, boost::listS, boost::undirectedS, map::place, map::link, boost::no_property, boost::listS>, boost::detail::error_property_not_found, const boost::detail::error_property_not_found&, boost::vertex_index_t> >*) (&vertex_id)))), ((void* const&)((void* const*) (+(&i)->std::_List_iterator<_Tp>::operator* [with _Tp = void*]()))))' /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.5/include/g++-v3/bits/ostream.tcc:63: note: candidates are: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>&(*)(std::basic_ostream<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>] Not being very good at deciphering all that, I'm not sure what is happening. I do understand that it's missing an extraction operator but I'm not sure on what. The actual line in graphviz.hpp is: out << get(vertex_id, *i); Two questions: - Could somebody tell me exactly what that get returns? - From the dot format, this should be the name of the vertex in the dot file. So this seems to relate to the class used as a property. My second question is then: If this is the case, why then do we need the property writer since we apparently also need the operator<< that could do exactly the same thing? (And isn't a ' ' (space) missing between the vertex name and whatever the property writer writes (or should that be included in it, which is not mentioned by the documentation)? That was 3 questions then ;-) Thanks in advance for any replies. Cheers, Fred