[graph] boost::adj_list_edge_property_map
Hello, I encounter some problems when porting an application using boost from Windows to Linux. I work with Ubuntu, I use codeblocks as a compiling environment. The boost library I use is boost_1_38 containing boost_1_38/boost/property_map.hpp boost_1_38/boost/config.hpp boost_1_38/boost/graph/adjacency_list.hpp boost_1_38/boost/graph/graph_utility.hpp. I believe the boost library is compatible with Windows and Linux. The compiler reports the following errror: .../structure_learning/src/graph_tools/GraphPDAG.cpp:295 erreur: conversion from "boost::adj_list_edge_property_map<boost::bidirectional::tag, boost::detail::error_property_not_found, boost::detail::error_property_not_found&, void*, boost::property<boost::edge_weight_t, long double, boost::no_property>, boost::edge_bundle_t" to non-scalar type "boost::no_edge_bundle" requested. Then, it finds a second error: .../structure_learning/src/graph_tools/GraphPDAG.cpp:296 erreur: "struct boost::no_edge_bundle" has no member named "ambiguous". Finally, the third error is (after verbose comments which I can not copy here): GraphPDAG.cpp:296: instantiated from here: boost_1_38/boost/graph/adjacency_list.hpp:463:erreur:invalid initialisation of reference of type "boost::no_edge_bundle&" from expression of type "boost::detail::error_property_not_found". Do you have any idea why this code is correct with Windows but not with Linux ? I would have thought that the boost C++ library is compatible with any system. Thank you in advance for considering my questions. Best regards, C.S. //============================================================================== void PDAG::putWeightPDAG(slBayesianNetwork* bn, slEdge e, int w) { unsigned int a, b; this->pBN = bn; this->getEdgeNodesIndex(e, a, b); this->putWeightPDAG(a, b, w); slGraph& graph = bn->get_graph(); property_map<slGraph, edge_weight_t>::type weightMap = get(edge_weight, graph); line 295 >>>>> edge_bundle_type<slGraph>::type ambiguousTypeMap = get(edge_bundle, graph); line 296 >>>>> graph[e].ambiguous = true; }
On Fri, 19 Feb 2010, Christine SINOQUET wrote:
Hello,
I encounter some problems when porting an application using boost from Windows to Linux.
I work with Ubuntu, I use codeblocks as a compiling environment. The boost library I use is boost_1_38 containing boost_1_38/boost/property_map.hpp boost_1_38/boost/config.hpp boost_1_38/boost/graph/adjacency_list.hpp boost_1_38/boost/graph/graph_utility.hpp.
I believe the boost library is compatible with Windows and Linux.
What compilers are you using on the two platforms? Are you using GCC on both? That will probably determine what the issue is. The part of BGL that you're getting an error from should not have any platform dependencies but does depend on a standards-compliant compiler. -- Jeremiah Willcock
participants (2)
-
Christine SINOQUET
-
Jeremiah Willcock