Open WanpengShao opened 4 years ago
Hi,
are you compling with python or mex?
Dear sir No, I have not use files in mex folder. I just use files in include fold. And I call the function in API file. Like this.
Call function:
CP::cut_pursuit
Are you using c++11 flag to compile? Are you using a 64 or 32 bit compiler? Which version of GCC?
Edit: actually I think I know what the problem is. You are using windows right? Can you add somewhere and let me know of the results?
std::cout << "Size of long int:" << sizeof(long) << std::endl;
release x64, language standard is is set default. but I thin kit is higher version than c++11. VS may not have the GCC version, it use its own compiler. It is different form the GCC compiler. So I will try the GCC compiler to compile the code again. Thank you.
Like i said above, I think this is more linked to win64 use of LLP64 instead of Linux64, which uses LP64. I don't have access to a windows station, so I can't test it out. If you run the line above it will tell us wether or not this is the issue.
It is an old issue now. For anyone who still faces the problem, I think the solution can be simply replacing long unsigned int with unsigned __int64 in the Graph.h, i.e.
using EdgeAttributeMap = boost::adj_list_edge_property_map<
boost::directed_tag, EdgeAttribute<T>, EdgeAttribute<T> &
, long unsigned int, CP::EdgeAttribute<T>, boost::edge_bundle_t>;
with
using EdgeAttributeMap = boost::adj_list_edge_property_map<
boost::directed_tag, EdgeAttribute<T>, EdgeAttribute<T> &
, unsigned __int64, CP::EdgeAttribute<T>, boost::edge_bundle_t>;
using boost 1.65
error C2440 initialization problem “”: can not covert 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
] graph_cut_segmentation D:\wpcode\graph_cut_segmentation\graph_cut_segmentation\CutPursuit\include\CutPursuit.h 453
I use the boost 1_64 version. Then I doubt it is the version problem. Then I also use the higher boost 1_67 version. But it still happend. So could you please how to fix the compile problem?