Closed rshah240 closed 4 years ago
Are you using C++ 17?
Yes
During building It is showing this kind of error ^CCMakeFiles/pygcransac.dir/build.make:75: recipe for target 'CMakeFiles/pygcransac.dir/src/pygcransac/src/gcransac_python.cpp.o' failed
It was solved when I updated my g++ version. Thank you.
/home/meditab/graph-cut-ransac/src/pygcransac/include/utils.h: In function ‘void gcransac::utils::detectFeatures(std::cxx11::string, cv::Mat, cv::Mat, cv::Mat&)’: /home/meditab/graph-cut-ransac/src/pygcransac/include/utils.h:232:13: error: expected unqualified-id before ‘[’ token for (auto[distance_ratio, point_1, point_2] : correspondences) ^ /home/meditab/graph-cut-ransac/src/pygcransac/include/utils.h:232:13: error: expected ‘;’ before ‘[’ token /home/meditab/graph-cut-ransac/src/pygcransac/include/utils.h:232:14: error: ‘distance_ratio’ was not declared in this scope for (auto[distance_ratio, point_1, point_2] : correspondences) ^ /home/meditab/graph-cut-ransac/src/pygcransac/include/utils.h:232:30: error: ‘point_1’ was not declared in this scope for (auto[distance_ratio, point_1, point_2] : correspondences) ^ /home/meditab/graph-cut-ransac/src/pygcransac/include/utils.h:232:39: error: ‘point_2’ was not declared in this scope for (auto[distance_ratio, point_1, point_2] : correspondences) ^ /home/meditab/graph-cut-ransac/src/pygcransac/include/utils.h: In lambda function: /home/meditab/graph-cut-ransac/src/pygcransac/include/utils.h:232:48: error: expected ‘{’ before ‘:’ token for (auto[distance_ratio, point_1, point_2] : correspondences) ^ /home/meditab/graph-cut-ransac/src/pygcransac/include/utils.h: In function ‘void gcransac::utils::detectFeatures(std::cxx11::string, cv::Mat, cv::Mat, cv::Mat&)’: /home/meditab/graph-cut-ransac/src/pygcransac/include/utils.h:232:48: error: expected ‘;’ before ‘:’ token /home/meditab/graph-cut-ransac/src/pygcransac/include/utils.h:232:48: error: expected primary-expression before ‘:’ token /home/meditab/graph-cut-ransac/src/pygcransac/include/utils.h:232:48: error: expected ‘)’ before ‘:’ token /home/meditab/graph-cut-ransac/src/pygcransac/include/utils.h:232:48: error: expected primary-expression before ‘:’ token
This error occurs during building of the library. Please help