Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Point Cloud Library 1.10 requires C++14 standard #49

Open
duncanmcbryde opened this issue Oct 8, 2020 · 1 comment
Open

Point Cloud Library 1.10 requires C++14 standard #49

duncanmcbryde opened this issue Oct 8, 2020 · 1 comment

Comments

@duncanmcbryde
Copy link

OS: Ubuntu 20.04
ROS: Melodic

Crashes on compile, because the point cloud library needs C++ 14 standard, and
this is compiled with C++ 11.

In file included from /usr/include/pcl-1.10/pcl/pcl_macros.h:77,
                 from /usr/include/pcl-1.10/pcl/point_types.h:42,
                 from /home/duncan/catkin_ws/src/ros_rslidar/rslidar_driver/src/rsdriver.h:23,
                 from /home/duncan/catkin_ws/src/ros_rslidar/rslidar_driver/src/rsdriver.cpp:12:
/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
      |    ^~~~~

Many compile errors follow.

/usr/include/pcl-1.10/pcl/common/io.h:65:9: note:   no known conversion for argument 1 from ‘const pcl::PCLPointField’ to ‘int’
make[2]: *** [ros_rslidar/rslidar_driver/src/CMakeFiles/rslidar_driver.dir/build.make:63: ros_rslidar/rslidar_driver/src/CMakeFiles/rslidar_driver.dir/rsdriver.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3405: ros_rslidar/rslidar_driver/src/CMakeFiles/rslidar_driver.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
Invoking "make -j1 -l1" failed

This can be fixed by changing the C++ standard.

Edit rslidar_driver/CMakeLists.txt and rslidar_pointcloud/CMakeLists.txt
and change the line

add_compile_options(-std=c++11)

to

add_compile_options(-std=c++14)

for each file.

Similar to issue in rslidar_sdk
RoboSense-LiDAR/rslidar_sdk#2

@duncanmcbryde
Copy link
Author

Looks like pull #43 also fixes this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant