boost::placeholders::_1 has not been declared

asked 2021-10-15 10:10:25 -0500

Kashif gravatar image

Ros : Noetic Ubuntu: Focal Fossa 20.04 I am struggling with the following Issues

 catkin_make
Base path: /home/abc/catkin_ws
Source space: /home/abc/catkin_ws/src
Build space: /home/abc/catkin_ws/build
Devel space: /home/abc/catkin_ws/devel
Install space: /home/abc/catkin_ws/install
#### #### Running command: "make cmake_check_build_system" in "/home/abc/catkin_ws/build" #### #### #### Running command: "make -j4 -l4" in "/home/abc/catkin_ws/build" ####
[  0%] Built target std_msgs_generate_messages_cpp
[  0%] Built target std_msgs_generate_messages_py
[  0%] Built target std_msgs_generate_messages_lisp
[  0%] Built target std_msgs_generate_messages_nodejs
[  0%] Built target std_msgs_generate_messages_eus
[  0%] Built target _beginner_tutorials_generate_messages_check_deps_Num
[  0%] Built target _beginner_tutorials_generate_messages_check_deps_AddTwoInts
[ 29%] Built target beginner_tutorials_generate_messages_lisp
[ 35%] Built target beginner_tutorials_generate_messages_py
[ 47%] Built target beginner_tutorials_generate_messages_cpp
[ 58%] Built target beginner_tutorials_generate_messages_nodejs
[ 76%] Built target beginner_tutorials_generate_messages_eus
[ 76%] Built target beginner_tutorials_generate_messages
[ 82%] Building CXX object beginner_tutorials/CMakeFiles/listener.dir/src/listener.cpp.o
[ 88%] Building CXX object beginner_tutorials/CMakeFiles/talker.dir/src/talker.cpp.o
In file included from /opt/ros/noetic/include/ros/node_handle.h:32,
                 from /opt/ros/noetic/include/ros/ros.h:45,
                 from /home/abc/catkin_ws/src/beginner_tutorials/src/talker.cpp:1:
/opt/ros/noetic/include/ros/publisher.h: In member function ‘boost::function<void(const boost::shared_ptr<ros::SubscriberLink>&)> ros::Publisher::getLastMessageCallback()’:
/opt/ros/noetic/include/ros/publisher.h:174:70: error: boost::placeholders’ has not been declared
  174 |       return boost::bind(&Impl::pushLastMessage, impl_.get(), boost::placeholders::_1);
      |                                                                      ^~~~~~~~~~~~
In file included from /opt/ros/noetic/include/ros/node_handle.h:32,
                 from /opt/ros/noetic/include/ros/ros.h:45,
                 from /home/abc/catkin_ws/src/beginner_tutorials/src/listener.cpp:1:
/opt/ros/noetic/include/ros/publisher.h: In member function ‘boost::function<void(const boost::shared_ptr<ros::SubscriberLink>&)> ros::Publisher::getLastMessageCallback()’:
/opt/ros/noetic/include/ros/publisher.h:174:70: error: boost::placeholders’ has not been declared
  174 | turn boost::bind(&Impl::pushLastMessage, impl_.get(), boost::placeholders::_1);
      |                                                              ^~~~~~~~~~~~

In file included from /opt/ros/noetic/include/ros/ros.h:45,
                 from /home/abc/catkin_ws/src/beginner_tutorials/src/talker.cpp:1:
/opt/ros/noetic/include/ros/node_handle.h: In member function ‘ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(M), T*, const ros::TransportHints&)’:
/opt/ros/noetic/include/ros/node_handle.h:406:91: error: boost::placeholders’ has not been declared
  406 |     ops.template initByFullCallbackType<M>(topic, queue_size, boost::bind(fp, obj, boost::placeholders::_1));
      |                                                                                           ^~~~~~~~~~~~ /opt/ros/noetic/include/ros/node_handle.h: In member function ‘ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(M) const, T*, const ros::TransportHints&)’:
/opt/ros/noetic/include/ros/node_handle.h:417:91: error: boost::placeholders’ has not been declared
  417 |     ops.template initByFullCallbackType<M>(topic, queue_size, boost::bind(fp, obj, boost::placeholders::_1));
      |                                                                                           ^~~~~~~~~~~~ /opt/ros/noetic/include/ros/node_handle.h: In member function ‘ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(const boost::shared_ptr<const M>&), T*, const ros::TransportHints&)’:
/opt/ros/noetic/include/ros/node_handle.h:470:73: error: boost::placeholders’ has not been declared
  470 |     ops.template init<M>(topic, queue_size, boost::bind(fp, obj, boost::placeholders::_1));
      |                                                                         ^~~~~~~~~~~~ /opt/ros/noetic/include/ros/node_handle.h: In member function ‘ros::Subscriber ros::NodeHandle::subscribe(const string& ...
(more)
edit retag flag offensive close merge delete

Comments

Some suggestions are in #q382677, but we never solved it there. Did you type the code in yourself? Can you provide a link where I can download your files?

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-10-16 06:56:20 -0500 )edit

Did you figure out the cause of this problem?

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-10-22 17:53:16 -0500 )edit