Failed to compile using catkin build
nimesh00 opened this issue · 1 comments
I have installed in my system and it is working fine. I was trying to install ROS plugins through source, but during the build of plotjuggler_ros package I get the following error(s). Can someone point out what I am doing wrong and/or what can be possible solution of this. I am using ROS Noetic on mac m1 installed through conda (robostack).
/Users/meshin/Dev/ros/src/plotjuggler-ros-plugins/plugins/ros1_introspection/src/ros_message.cpp:62:84: error: no member named 'ptr_fun' in namespace 'std'
line.erase(line.begin(), std::find_if(line.begin(), line.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));
~~~~~^
/Users/meshin/Dev/ros/src/plotjuggler-ros-plugins/plugins/ros1_introspection/src/ros_message.cpp:62:95: error: expected '(' for function-style cast or type construction
line.erase(line.begin(), std::find_if(line.begin(), line.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));
~~~^
/Users/meshin/Dev/ros/src/plotjuggler-ros-plugins/plugins/ros1_introspection/src/ros_message.cpp:62:100: error: expected '(' for function-style cast or type construction
line.erase(line.begin(), std::find_if(line.begin(), line.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));
Thanks in advance!
Fixed it by replacing line 62:
line.erase(line.begin(), std::find_if(line.begin(), line.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));
with
line.erase(line.begin(), std::find_if(line.begin(), line.end(), [](unsigned char c){return !std::isspace(c);}));