rtt_ros_integration marshalling C++ linking
Hi all,
I am currently trying to follow the examples for orocos using the rtt_ros_integration package.
The examples were written for an old version of the rtt ros integration package hence I have to change a few things to get them working.
I have a problem with example hello 2 when trying to load the marshalling service into my component in C++, my compilation outputs the following problem:
CMakeFiles/hello-2-properties.dir/HelloWorld.cpp.o: In function `boost::shared_ptr<RTT::Marshalling> boost::dynamic_pointer_cast<RTT::Marshalling, RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester> const&)':
/usr/include/boost/smart_ptr/shared_ptr.hpp:814: undefined reference to `typeinfo for RTT::Marshalling'
CMakeFiles/hello-2-properties.dir/HelloWorld.cpp.o: In function `boost::detail::sp_if_not_array<RTT::Marshalling>::type boost::make_shared<RTT::Marshalling, RTT::TaskContext*>(RTT::TaskContext* const&)':
/usr/include/boost/smart_ptr/make_shared_object.hpp:711: undefined reference to `RTT::Marshalling::Marshalling(RTT::TaskContext*)'
collect2: error: ld returned 1 exit status
It looks to me that my linker cannot find some definition it needs.
Now googling for the problem what I find is the answer for the problem, but for the old version of rtt ros integration. The solution being to add rtt-marshalling
to find_package()
and RTT-MARSHALLING_LIBRARY
to target_link_libraries()
in the CMakeLists.txt.
Obviously this no longer works.
Note that the marshalling works well when loaded from script.
Anyone has an idea?
Thanks,
Antoine.