Linking errors after updating to Hydro [closed]
I updated my ROS distribution to Hydro from Fuerte today and followed the migration guide to update my codes(mostly related to PCL). But building it gives much linking error after compiling:
In function `message_filters::Synchronizer<message_filters::sync_policies::exacttime<sensor_msgs::pointcloud2_<std::allocator<void> >, sensor_msgs::Image_<std::allocator<void> >, message_filters::NullType, message_filters::NullType, message_filters::NullType, message_filters::NullType, message_filters::NullType, message_filters::NullType, message_filters::NullType> >::disconnectAll()': /opt/ros/hydro/include/message_filters/synchronizer.h:351: undefined reference to `message_filters::Connection::disconnect()' ... In function `void pcl::detail::FieldMapper<pcl::pointxyzrgb>::operator()<pcl::fields::rgb>()': /usr/include/pcl-1.7/pcl/conversions.h:106: undefined reference to `pcl::console::print(pcl::console::VERBOSITY_LEVEL, char const*, ...)' ... In function `Duration': /opt/ros/hydro/include/ros/duration.h:119: undefined reference to `tf::Transformer::DEFAULT_CACHE_TIME' undefined reference to `tf::Transformer::waitForTransform(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&, ros::Time const&, std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&, ros::Time const&, std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&, ros::Duration const&, ros::Duration const&, std::basic_string<char, std::char_traits<char="">, std::allocator<char> >*) const' undefined reference to `tf::Transformer::lookupTransform(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&, ros::Time const&, std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&, ros::Time const&, std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&, tf::StampedTransform&) const'
This was an rosbuild
managed project and it works well on ROS Fuerte. I was managing the projects through env var $ROS_PACKAGE. This package depends on std_msgs
, roscpp
, sensor_msgs
...tf
...pcl_conversions
in the manifest.xml, and it uses OpenCV, Qt4, PCL and many other 3rd party system dependencies in CMakeLists.txt .
So what am I missing? Should more dependencies be added into the manifest.xml?
What were you missing in the end? I'm getting same errors :x
In fact a small mistake I remember, but sorry I cannot recall the details..
I fixed my "undefined reference to tf::Transformer..." by including "tf" in the "find_package" part of the CMakeLists.
and add
<build_depend>tf</build_depend> <run_depend>tf</run_depend>
to your package.xml