ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

build ros2 with c++11

asked 2018-08-22 20:38:47 -0600

alsora gravatar image

I have a project written in c++11.

I would like to integrate a ros2 node in it.

Is there a way to build ros2 code with the c++11 flag instead of the c++14 one ?

Thank you

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-08-22 20:40:51 -0600

William gravatar image

No, ROS 2 relies on C++14 features, so it must be built with a compiler that supports C++14 and has it enabled (e.g. with --std=c++14 or --std=gnu++14).

If you project builds with C++11 but your compiler supports C++14, then you can likely just build your C++11 based project with C++14 turned on and be fine.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-08-22 20:38:47 -0600

Seen: 544 times

Last updated: Aug 22 '18