ubuntu18.04中代码迁移到20.04报错
一、 PCL库,Eigen库报错,如:
- /usr/include/pcl-1.10/pcl/point_types.h:903:29: error: ‘enable_if_t’ in namespace ‘std’ does not name a template type; did you mean ‘enable_if’?
- /usr/include/pcl-1.10/pcl/point_types.h:698:1: error: ‘minusscalar’ is not a member of ‘pcl::traits’
698 | POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointDEM,
解决方案:尝试将CMakeLists 中 set(CMAKE_CXX_FLAGS “-std=c++11”)改为set(CMAKE_CXX_FLAGS “-std=c++14”)。