Error when add executable .cpp script

asked 2017-08-03 01:05:38 -0600

Quang Le gravatar image

Hi everyone,

When I'm trying to add executable node from my .cpp scrpit, i got this following error

In file included from /usr/include/boost/mem_fn.hpp:22:0,
             from /usr/include/boost/function/detail/prologue.hpp:18,
             from /usr/include/boost/function.hpp:24,
             from /opt/ros/indigo/include/ros/forwards.h:40,
             from /opt/ros/indigo/include/ros/common.h:37,
             from /opt/ros/indigo/include/ros/ros.h:43,
             from /home/cpda/mapping_ws/src/laser_mapping/src/laser2pc.cpp:1:
/usr/include/boost/bind/mem_fn_template.hpp:136:65: note: candidates are:
template<class R, class T, class A1 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(mf1)
                                                             ^
In file included from /usr/include/boost/bind/mem_fn.hpp:215:0,
             from /usr/include/boost/mem_fn.hpp:22,
             from /usr/include/boost/function/detail/prologue.hpp:18,
             from /usr/include/boost/function.hpp:24,
             from /opt/ros/indigo/include/ros/forwards.h:40,
             from /opt/ros/indigo/include/ros/common.h:37,
             from /opt/ros/indigo/include/ros/ros.h:43,
             from /home/cpda/mapping_ws/src/laser_mapping/src/laser2pc.cpp:1:
/usr/include/boost/bind/mem_fn_template.hpp:163:7: note: R boost::_mfi::mf1<R, T, A1>::operator()(T*, A1) const [with R = void; T = Laser2PC; A1 = const boost::shared_ptr<const sensor_msgs::LaserScan_<std::allocator<void> > >&]
 R operator()(T * p, A1 a1) const
   ^
/usr/include/boost/bind/mem_fn_template.hpp:163:7: note:   candidate expects 2 arguments, 1 provided
/usr/include/boost/bind/mem_fn_template.hpp:168:25: note: template<class U> R boost::_mfi::mf1<R, T, A1>::operator()(U&, A1) const [with U = U; R = void; T = Laser2PC; A1 = const boost::shared_ptr<const sensor_msgs::LaserScan_<std::allocator<void> > >&]
 template<class U> R operator()(U & u, A1 a1) const
                     ^
/usr/include/boost/bind/mem_fn_template.hpp:168:25: note:   template argument deduction/substitution failed:
In file included from /usr/include/boost/function/detail/maybe_include.hpp:18:0,
             from /usr/include/boost/function/detail/function_iterate.hpp:14,
             from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:52,
             from /usr/include/boost/function.hpp:64,
             from /opt/ros/indigo/include/ros/forwards.h:40,
             from /opt/ros/indigo/include/ros/common.h:37,
             from /opt/ros/indigo/include/ros/ros.h:43,
             from /home/cpda/mapping_ws/src/laser_mapping/src/laser2pc.cpp:1:
/usr/include/boost/function/function_template.hpp:225:11: note:   candidate expects 2 arguments, 1 provided
       BOOST_FUNCTION_RETURN(boost::mem_fn(*f)(BOOST_FUNCTION_ARGS));
       ^

I have no idea what kind of error is this. Can someone helpme?? This is the script i tried to add executabe: link text

edit retag flag offensive close merge delete

Comments

1

I don't think this is the complete error. Specifically, the actual error line is missing. It's probably one similar to "no matching function call ....". The lines you included in your question are the alternatives that the compiler suggests.

gvdhoorn gravatar image gvdhoorn  ( 2017-08-03 02:51:10 -0600 )edit