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

rosmake dont know std ?

asked 2016-03-11 08:17:01 -0500

TomSon gravatar image

Hi everyone, I got an issue compiling my node with rosmake. it didn't find std :

 error: ‘to_string’ is not a member of ‘std’

Did I miss something ?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2016-03-11 08:46:14 -0500

mgruhler gravatar image

to_string() is a C++11 feature (see here). Thus, you need to configure the CMakeLists.txt accordingly.

Also, you should consider switching to catkin ;-)

For catkin and with CMake >= 2.8.12 and a suitable g++ version (from Ubuntu 14.04 onward? I'm not quite sure) best use:

target_compile_options(<TARGET> PRIVATE -std=c++11)
edit flag offensive delete link more

Comments

I know catkin rooks but it's too complicate for the basic node I developped. Here is what I put in my makefile :

if(CMAKE_COMPILER_IS_GNUCXX)
    add_definitions(-std=gnu++0x)
endif()
TomSon gravatar image TomSon  ( 2016-03-11 08:57:31 -0500 )edit
0

answered 2016-03-11 08:23:18 -0500

MarkyMark2012 gravatar image
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-03-11 08:17:01 -0500

Seen: 669 times

Last updated: Mar 11 '16