/usr/include/pcl-1.10/pcl/pcl_config.h:7:4: error: #error PCL requires C++14 or above 7 | #error PCL requires C++14 or above | ^~~~~ In file included from /usr/include/pcl-1.10/pcl/console/print.h:44, from /usr/include/pcl-1.10/pcl/conversions.h:53, from /usr/include/pcl-1.10/pcl/common/io.h:48, from /usr/include/pcl-1.10/pcl/kdtree/kdtree.h:45, from /usr/include/pcl-1.10/pcl/kdtree/kdtree_flann.h:43, from /home/qjf/slam/laser_SLAM/PJLab-ADG/src/Livox-Mapping-main/LIO-Livox/include/MapManager/Map_Manager.h:3,
解决: 在对应ros包中的CMakeLists.txt中添加
ADD_COMPILE_OPTIONS(-std=c++11 )
ADD_COMPILE_OPTIONS(-std=c++14 )
set( CMAKE_CXX_FLAGS "-std=c++11 -O3" )
或者
set( CMAKE_CXX_STANDARD 14)
|