loicland / cut-pursuit

C++ implementation for the cut pursuit algorithm, with Matlab interfaces
MIT License
77 stars 24 forks source link

Mex errors on Windows #14

Closed MuxLi closed 6 years ago

MuxLi commented 6 years ago

Hi,

When I try to compile the mex file, it gives me the following error:

d:\code\cut-pursuit\include\CutPursuit.h(199): error C2440: 'initializing': cannot convert from 'boost::adj_list_edge_property_map<boost::directed_tag,CP::EdgeAttribute,CP::EdgeAttribute &,unsigned __int64,Property,Tag>' to 'boost::adj_list_edge_property_map<boost::directed_tag,CP::EdgeAttribute,CP::EdgeAttribute &,unsigned long,CP::EdgeAttribute,boost::edge_bundle_t>' with [ T=float, Property=CP::EdgeAttribute, Tag=boost::edge_bundle_t ] and [ T=float ] d:\code\cut-pursuit\include\CutPursuit.h(199): note: No constructor could take the source type, or constructor overload resolution was ambiguous

MuxLi commented 6 years ago

This fix worked, as suggested by the author:

Change Graph.h line 64:

template using EdgeAttributeMap = boost::adj_list_edge_property_map< boost::directed_tag, EdgeAttribute, EdgeAttribute & , long unsigned int, CP::EdgeAttribute, boost::edge_bundle_t>;

to

template using EdgeAttributeMap = boost::adj_list_edge_property_map< boost::directed_tag, EdgeAttribute, EdgeAttribute & , unsigned __int64, CP::EdgeAttribute, boost::edge_bundle_t>;