0

I am performing calibration using link "https://github.com/lixiny/handeye-calibration-ros".

When I run catkin_make under src/ Handeye-Calibration-ROS, it is giving me following error:

/usr/include/pcl-1.10/pcl/common/impl/io.hpp:272:33: error: use of ‘auto’ in lambda parameter declaration only available with ‘-std=c++14’ or ‘-std=gnu++14’

and command catkin_make end with PCL error:

make[2]: *** [camera_driver/CMakeFiles/realsense2_driver.dir/build.make:76: camera_driver/CMakeFiles/realsense2_driver.dir/src/realsense2_driver.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2053: camera_driver/CMakeFiles/realsense2_driver.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
Invoking "make -j24 -l24" failed

I tried CXXFLAGS=--std=gnu++14, still same error.

In which file I need to change the value of C++?

Manpreet
  • 43
  • 1
  • 6

1 Answers1

0

According to Cmake's site, you can set the c++ standard using:

set_property(TARGET tgt PROPERTY CXX_STANDARD 14)

If you want to modify the makefile itself, adding the c++ flag should produce a command that looks similar to:

g++ -std=c++14(or gnu++14) main.cpp -o main
Maou Shimazu
  • 61
  • 1
  • 2
  • This didn't help. To confirm which file I need to modify. CMakeLists.Txt file is lock. Under the build>CMakeFiles>Makefile.cmake, do I need to modify this file or some other – Manpreet Jul 20 '22 at 12:30
  • This should be going in CMakeLists.txt, i don't believe it would work if you put it in Makefile.cmake. Can you elaborate on what you mean by it being locked? – Maou Shimazu Jul 20 '22 at 22:51
  • When I installed Handeye-Calibration-ROS, CMakeLists.txt is locked. I changed camera_driver, camera_transform_publisher, handeye_calib_marker CMakeList.txt file. I changed C++11 to C++14. After that package handeye_calib_marker, camera_transform_publisher passed, where camera_driver failed `Catkin build` – Manpreet Jul 22 '22 at 12:27