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

The real error is this bit of the message you get:

cc1plus: error: unrecognized command line option -std=c++11

The error basically tells you that the iiwa_ros package is configuring the compiler (g++) to compile with support for C++11, but that your compiler version (which is not visible in the output you posted, but I'm guessing is 4.6.x, as you are running Ubuntu Precise) does not recognise that particular option.

It's probably used elsewhere as well, but here is the line in iiwa_ros/CMakeLists.txt that configured the flags. Note btw that this is not ROS-specific, but a case of using compiler options without checking they are supported.

You have three options:

  1. upgrade to Ubuntu Trusty, which comes with a compiler that does support this
  2. see if changing all -std=c++11 to -std=c++0x (or even -std=gnu++0x, but that probably won't matter) also works (this depends on which specific aspects of C++11 the code in iiwa_stack uses)
  3. install a C++11 capable compiler on Ubuntu Precise (see How to Install GCC 4.8 via PPA in Ubuntu 12.04, 13.04, 10.04 fi on how to do this, but there are many more)

Option 1 seems like a lot of work, but iiwa_stack/README.md states that this is a "ROS indigo metapackage", so even if you get options 2 or 3 working, there will most likely be other things that won't work on Precise/Hydro. If you have no real requirement to be on Precise/Hydro, I'd recommend option 1.