[英]error: use of ‘auto’ in lambda parameter declaration only available with ‘-std=c++14’ or ‘-std=gnu++14’ and PCL errors
I am performing calibration using link "https://github.com/lixiny/handeye-calibration-ros".我正在使用链接“https://github.com/lixiny/handeye-calibration-ros”进行校准。
When I run catkin_make
under src/ Handeye-Calibration-ROS
, it is giving me following error:当我在
src/ Handeye-Calibration-ROS
下运行catkin_make
时,它给了我以下错误:
/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:和命令
catkin_make
以 PCL 错误结束:
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.我试过
CXXFLAGS=--std=gnu++14
,仍然是同样的错误。
In which file I need to change the value of C++?我需要在哪个文件中更改 C++ 的值?
According to Cmake's site , you can set the c++ standard using:根据Cmake's site ,您可以使用以下方法设置 c++ 标准:
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:如果您想修改 makefile 本身,添加 c++ 标志应该会生成一个类似于以下内容的命令:
g++ -std=c++14(or gnu++14) main.cpp -o main
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.