Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't compile code using Boost graphviz.hpp
    text
    copied!<p>I'm trying to use read_graphviz extension to pull a graphviz .dot file into a Boost Grpah. Here is my sample. I can't get it to compile. I posted the g++ error message after the code but I had to but it short, it's too long to post here without significant re-formatting.</p> <p>The documentation the graphviz.hpp library is too terse to guide me in the right direction. Anyone have any thoughts?</p> <pre><code>#include &lt;iostream&gt; #include &lt;boost/graph/graph_traits.hpp&gt; #include &lt;boost/graph/adjacency_list.hpp&gt; #include &lt;boost/property_map.hpp&gt; #include &lt;boost/graph/graphviz.hpp&gt; int main( int argc, char* argv[] ) { assert( argc == 2 ); std::ifstream dotFile( argv[1], std::ifstream::in ); typedef boost::adjacency_list&lt;&gt; Graph; Graph graph( 17 ); boost::dynamic_properties properties; boost::property_map&lt; Graph, boost::vertex_name_t &gt;::type name = get( boost::vertex_name, graph ); properties.property( "node_id", name ); bool readResult; readResult = read_graphviz( dotFile, graph, properties ); return 0; </code></pre> <hr> <pre><code>g++ -Wall -c -o graphvizTest.o graphvizTest.cpp /usr/include/boost/dynamic_property_map.hpp: In member function std::string boost::detail::dynamic_property_map_adaptor&lt;PropertyMap&gt;::get_string(const boost::any&amp;) [with PropertyMap = boost::vec_adj_list_vertex_property_map&lt; boost::adjacency_list&lt; boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::no_property, boost::no_property, boost::listS &gt;, boost::adjacency_list&lt; boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::no_property, boost::no_property, boost::listS &gt;*, boost::detail::error_property_not_found, boost::detail::error_property_not_found&amp;, boost::vertex_name_t &gt; ]': graphvizTest.cpp:29: instantiated from here /usr/include/boost/dynamic_property_map.hpp:196: error: no match for 'operator&lt;&lt;' in 'out &lt;&lt; boost::get [with PropertyMap = boost::vec_adj_list_vertex_property_map&lt; boost::adjacency_list&lt; boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::no_property, boost::no_property, boost::listS &gt;, boost::adjacency_list&lt; boost::vecS, boost::vecS, boost::directedS, boost::no_property, boost::no_property, boost::no_property, boost::listS &gt;*, boost::detail::error_property_not_found, boost::detail::error_property_not_found&amp;, boost::vertex_name_t &gt;, Reference = boost::detail::error_property_not_found&amp;, K = long unsigned int ] ... </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload