How to link OROCOS component to a Shared Library which I developed before!!

Hi all,

Does any one has experience how to link a created component using orocreate-pkg, to a shared Library developed in C++.

I used to linking and including the external items using Cmake but i don't know how to do it with the OROCOS component. I always getting undefined reference error message.

Please Help!!

Now it is linked successfully

but I got an error with the deployer said:

Unloading SharedLibrary.so: not a valid component library

Actually the shared library has been placed in the installlib/project folder beside the libOrocosComponent-gnulinux.so.

I suppose that the deployer will work to load all the so files which are in this folder, but what should I do? and where should I install the shared library to be visible to the libOrocosComponent Library.

Thanks,,

Ruben Smits's picture

Now it is linked successfully

AFAIK

If you create the component using the orocos_component cmake macro the
library should get installed into
install-prefix/lib/orocos/target/package-name

Libraries that are created using add_library go into install-prefix/lib

Normally the deployer would only look into the
install-prefix/lib/orocos/target directory to load components, unless you
set the RTT_COMPONENT_PATH differently.

R

On Thu, Mar 19, 2015 at 3:52 AM, <alaaeldeen [dot] abdalrahman [..] ....j

wrote:

> but I got an error with the deployer said:
>
> Unloading SharedLibrary.so: not a valid component library
>
> Actually the shared library has been placed in the installlib/project
> folder
> beside the libOrocosComponent-gnulinux.so.
>
> I suppose that the deployer will work to load all the so files which are in
> this folder, but what should I do? and where should I install the shared
> library to be visible to the libOrocosComponent Library.
>
> Thanks,,
> --
> Orocos-Users mailing list
> Orocos-Users [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>

Ruben Smits's picture

How to link OROCOS component to a Shared Library which I develop

>From http://www.orocos.org/wiki/orocos/toolchain/component-packages#toc4

orocos_component( mycomponent ComponentSource.cpp )
target_link_libraries( mycomponent ${YOUR_LIBRARY} )

R.

On Thu, Mar 19, 2015 at 2:28 AM, <alaaeldeen [dot] abdalrahman [..] ....j

wrote:

> Hi all,
>
> Does any one has experience how to link a created component using
> orocreate-pkg, to a shared Library developed in C++.
>
> I used to linking and including the external items using Cmake but i don't
> know how to do it with the OROCOS component. I always getting undefined
> reference error message.
>
> Please Help!!
> --
> Orocos-Users mailing list
> Orocos-Users [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>

How to link OROCOS component to a Shared Library which I develop

thanks Ruben, it is working now, But I have another strange issue, can you
please check it?

Thanks Again,,

On Thu, Mar 19, 2015 at 5:00 PM, Ruben Smits <ruben [dot] smits [..] ...>
wrote:

> From http://www.orocos.org/wiki/orocos/toolchain/component-packages#toc4
>
>
> orocos_component( mycomponent ComponentSource.cpp )
> target_link_libraries( mycomponent ${YOUR_LIBRARY} )
>
>
>
> R.
>
> On Thu, Mar 19, 2015 at 2:28 AM, <alaaeldeen [dot] abdalrahman [..] ....j

wrote:
>
>> Hi all,
>>
>> Does any one has experience how to link a created component using
>> orocreate-pkg, to a shared Library developed in C++.
>>
>> I used to linking and including the external items using Cmake but i don't
>> know how to do it with the OROCOS component. I always getting undefined
>> reference error message.
>>
>> Please Help!!
>> --
>> Orocos-Users mailing list
>> Orocos-Users [..] ...
>> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>>
>
>
>
> --
> Ruben Smits, Roboticist - Founder
> +32 479 511 786
> Intermodalics - Kapeldreef 60, 3001 Heverlee - BELGIUM
> www.intermodalics.eu
>