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

Revision history [back]

click to hide/show revision 1
initial version

All the current distributions of ROS are compiled using C++03.

You can compile your own packages using c++11 by adding the following line to the CMakeLists.txt of your project:

add_definitions(-std=c++11)

Note that it is recomended to have checks for c++11 features at configure time and provide equivalent functionality with extra compiler features. This is only required if you are planning to release the ROS packages that you develop. If you are only planning to use your packages yourself then you can just c++11 functionality. You can read more about ROS and C++11 here: link text

All the current distributions of ROS are compiled using C++03.

You can compile your own packages using c++11 by adding the following line to the CMakeLists.txt of your project:

add_definitions(-std=c++11)
add_compile_options(-std=c++11)

Note that it is recomended to have checks for c++11 features at configure time and provide equivalent functionality with extra compiler features. This is only required if you are planning to release the ROS packages that you develop. If you are only planning to use your packages yourself then you can just c++11 functionality. You can read more about ROS and C++11 here: link text