Linking error with marshalling

Hy all,
I stumbled in a problem:
if i use:
this->getProvider<Marshalling>("marshalling")->readProperties("file");

in a component (after #include <rtt/marsh/Marshalling.hpp>), i get the
following linking error:

Linking CXX shared library
../lib/orocos/gnulinux/libcartesiangeneratorwkpos-gnulinux.so
CMakeFiles/cartesiangeneratorwkpos.dir/src/CartesianGeneratorWKPos.cpp.o: In
function `boost::shared_ptr<RTT::Marshalling>
boost::dynamic_pointer_cast<RTT::Marshalling,
RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester> const&)':
CartesianGeneratorWKPos.cpp:(.text._ZN5boost20dynamic_pointer_castIN3RTT11MarshallingENS1_16ServiceRequesterEEENS_10shared_ptrIT_EERKNS4_IT0_EE[boost::shared_ptr<RTT::Marshalling>
boost::dynamic_pointer_cast<RTT::Marshalling,
RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
const&)]+0x19): undefined reference to `typeinfo for RTT::Marshalling'
CMakeFiles/cartesiangeneratorwkpos.dir/src/CartesianGeneratorWKPos.cpp.o: In
function `boost::shared_ptr<RTT::Marshalling>
boost::make_shared<RTT::Marshalling,
RTT::TaskContext*>(RTT::TaskContext* const&)':
CartesianGeneratorWKPos.cpp:(.text._ZN5boost11make_sharedIN3RTT11MarshallingEPNS1_11TaskContextEEENS_10shared_ptrIT_EERKT0_[boost::shared_ptr<RTT::Marshalling>
boost::make_shared<RTT::Marshalling,
RTT::TaskContext*>(RTT::TaskContext* const&)]+0xe7): undefined reference
to `RTT::Marshalling::Marshalling(RTT::TaskContext*)'
collect2: ld returned 1 exit status

i am currently using electric with latest debian packages.
Cheers, Gianni.

Linking error with marshalling

As far as I remeber, you have to change one line in the CMakelists.txt file:

find_package(OROCOS-RTT REQUIRED rtt-marshalling ${RTT_HINTS})

________________________________________
Van: orocos-users-bounces [..] ... [orocos-users-bounces [..] ...] namens Gianni Borghesan [gianni [dot] borghesan [..] ...]
Verzonden: dinsdag 29 mei 2012 15:50
Aan: orocos-users [..] ...
Onderwerp: [Orocos-users] Linking error with marshalling

Hy all,
I stumbled in a problem:
if i use:
this->getProvider<Marshalling>("marshalling")->readProperties("file");

in a component (after #include <rtt/marsh/Marshalling.hpp>), i get the
following linking error:

Linking CXX shared library
../lib/orocos/gnulinux/libcartesiangeneratorwkpos-gnulinux.so
CMakeFiles/cartesiangeneratorwkpos.dir/src/CartesianGeneratorWKPos.cpp.o: In
function `boost::shared_ptr<RTT::Marshalling>
boost::dynamic_pointer_cast<RTT::Marshalling,
RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester> const&)':
CartesianGeneratorWKPos.cpp:(.text._ZN5boost20dynamic_pointer_castIN3RTT11MarshallingENS1_16ServiceRequesterEEENS_10shared_ptrIT_EERKNS4_IT0_EE[boost::shared_ptr<RTT::Marshalling>
boost::dynamic_pointer_cast<RTT::Marshalling,
RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
const&)]+0x19): undefined reference to `typeinfo for RTT::Marshalling'
CMakeFiles/cartesiangeneratorwkpos.dir/src/CartesianGeneratorWKPos.cpp.o: In
function `boost::shared_ptr<RTT::Marshalling>
boost::make_shared<RTT::Marshalling,
RTT::TaskContext*>(RTT::TaskContext* const&)':
CartesianGeneratorWKPos.cpp:(.text._ZN5boost11make_sharedIN3RTT11MarshallingEPNS1_11TaskContextEEENS_10shared_ptrIT_EERKT0_[boost::shared_ptr<RTT::Marshalling>
boost::make_shared<RTT::Marshalling,
RTT::TaskContext*>(RTT::TaskContext* const&)]+0xe7): undefined reference
to `RTT::Marshalling::Marshalling(RTT::TaskContext*)'
collect2: ld returned 1 exit status

i am currently using electric with latest debian packages.
Cheers, Gianni.
--
Orocos-Users mailing list
Orocos-Users [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users

Linking error with marshalling

Sorry, you need to add also the linking line:

target_link_libraries(name_component ${OROCOS-RTT_RTT-MARSHALLING_LIBRARY} )

________________________________________
Van: orocos-users-bounces [..] ... [orocos-users-bounces [..] ...] namens Bert Willaert [Bert [dot] Willaert [..] ...]
Verzonden: dinsdag 29 mei 2012 16:15
Aan: Gianni Borghesan; orocos-users [..] ...
Onderwerp: Re: [Orocos-users] Linking error with marshalling

As far as I remeber, you have to change one line in the CMakelists.txt file:

find_package(OROCOS-RTT REQUIRED rtt-marshalling ${RTT_HINTS})

________________________________________
Van: orocos-users-bounces [..] ... [orocos-users-bounces [..] ...] namens Gianni Borghesan [gianni [dot] borghesan [..] ...]
Verzonden: dinsdag 29 mei 2012 15:50
Aan: orocos-users [..] ...
Onderwerp: [Orocos-users] Linking error with marshalling

Hy all,
I stumbled in a problem:
if i use:
this->getProvider<Marshalling>("marshalling")->readProperties("file");

in a component (after #include <rtt/marsh/Marshalling.hpp>), i get the
following linking error:

Linking CXX shared library
../lib/orocos/gnulinux/libcartesiangeneratorwkpos-gnulinux.so
CMakeFiles/cartesiangeneratorwkpos.dir/src/CartesianGeneratorWKPos.cpp.o: In
function `boost::shared_ptr<RTT::Marshalling>
boost::dynamic_pointer_cast<RTT::Marshalling,
RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester> const&)':
CartesianGeneratorWKPos.cpp:(.text._ZN5boost20dynamic_pointer_castIN3RTT11MarshallingENS1_16ServiceRequesterEEENS_10shared_ptrIT_EERKNS4_IT0_EE[boost::shared_ptr<RTT::Marshalling>
boost::dynamic_pointer_cast<RTT::Marshalling,
RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
const&)]+0x19): undefined reference to `typeinfo for RTT::Marshalling'
CMakeFiles/cartesiangeneratorwkpos.dir/src/CartesianGeneratorWKPos.cpp.o: In
function `boost::shared_ptr<RTT::Marshalling>
boost::make_shared<RTT::Marshalling,
RTT::TaskContext*>(RTT::TaskContext* const&)':
CartesianGeneratorWKPos.cpp:(.text._ZN5boost11make_sharedIN3RTT11MarshallingEPNS1_11TaskContextEEENS_10shared_ptrIT_EERKT0_[boost::shared_ptr<RTT::Marshalling>
boost::make_shared<RTT::Marshalling,
RTT::TaskContext*>(RTT::TaskContext* const&)]+0xe7): undefined reference
to `RTT::Marshalling::Marshalling(RTT::TaskContext*)'
collect2: ld returned 1 exit status

i am currently using electric with latest debian packages.
Cheers, Gianni.
--
Orocos-Users mailing list
Orocos-Users [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
--
Orocos-Users mailing list
Orocos-Users [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users