Closed hanny-liu closed 5 years ago
错误来源是
opt/ros/kinetic/include/actionlib/destruction_guard.h:62:80: error: no matching function for call to ‘boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000l>::subsecond_duration(float)’ countcondition.timed_wait(lock, boost::posix_time::milliseconds(1000.0f));
可以首先尝试从 boost 的依赖关系是否正确安装了开始。
同时,由于是 no matching call,如果是自己写的代码的话,需要看下参数类型是否是有错误。
附上部分出错代码,ros小白请问大家,如何解决 In file included from /opt/ros/kinetic/include/actionlib/managed_list.h:38:0, from /opt/ros/kinetic/include/actionlib/client/client_helpers.h:47, from /opt/ros/kinetic/include/actionlib/client/action_client.h:38, from /opt/ros/kinetic/include/actionlib/client/simple_action_client.h:47, from /home/liuhongwei/catkin_ws/src/ROS-Academy-for-Beginners/action_demo/src/dishes_Client.cpp:2: /opt/ros/kinetic/include/actionlib/destruction_guard.h: In member function ‘void actionlib::DestructionGuard::destruct()’: /opt/ros/kinetic/include/actionlib/destruction_guard.h:62:80: error: no matching function for call to ‘boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000l>::subsecond_duration(float)’ countcondition.timed_wait(lock, boost::posix_time::milliseconds(1000.0f)); ^ In file included from /usr/local/include/boost/date_time/posix_time/posix_time_config.hpp:16:0, from /usr/local/include/boost/date_time/posix_time/posix_time_system.hpp:13, from /usr/local/include/boost/date_time/posix_time/ptime.hpp:12, from /usr/local/include/boost/date_time/posix_time/posix_time_types.hpp:12, from /usr/local/include/boost/thread/thread_time.hpp:11, from /usr/local/include/boost/thread/detail/platform_time.hpp:11, from /usr/local/include/boost/thread/pthread/condition_variable.hpp:9, from /usr/local/include/boost/thread/condition_variable.hpp:16, from /usr/local/include/boost/thread/condition.hpp:13, from /opt/ros/kinetic/include/actionlib/client/simple_action_client.h:38, from /home/liuhongwei/catkin_ws/src/ROS-Academy-for-Beginners/action_demo/src/dishes_Client.cpp:2: /usr/local/include/boost/date_time/time_duration.hpp:285:14: note: candidate: template boost::date_time::subsecond_duration<base_duration, frac_of_second>::subsecond_duration(const T&, typename boost::enable_if<boost::is_integral, void>::type*)
explicit subsecond_duration(T const& ss,
^