link shared library

Hi

I have my own library which I built as a shared object (.so). How can I link this with my orocos component?

Ruben

link shared library

You can update the CMakeLists.txt in the src folder of your component with

1. in the top add:
link_directories(path of libraries directory)

2. then add your library name in the target link line
target_link_libraries(componentName -lYourLibrary)

Aladdin

*------------------------------------------------------------------*
AbdAlrahman Mohammad (Aladdin)
??????? ??????? (?????)
Technology Development Department *ZMP INC.*
*------------------------------------------------------------------*

On Tue, Mar 1, 2016 at 1:21 AM, <ruben [dot] vanparys [..] ...> wrote:

> Hi
>
> I have my own library which I built as a shared object (.so). How can I
> link
> this with my orocos component?
>
> Ruben
> --
> Orocos-Users mailing list
> Orocos-Users [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>

link shared library

> On Mar 01, 2016, at 01:26, AlaaEldeen, AbdAlrahman <alaaeldeen [dot] abdalrahman [..] ...> wrote:
>
> You can update the CMakeLists.txt in the src folder of your component with
>
> 1. in the top add:
> link_directories(path of libraries directory)
>
> 2. then add your library name in the target link line
> target_link_libraries(componentName -lYourLibrary)
>
> Aladdin
>
> ------------------------------------------------------------------
> AbdAlrahman Mohammad (Aladdin)
> ??????? ??????? (?????)
> Technology Development Department ZMP INC.
> ------------------------------------------------------------------
>
> On Tue, Mar 1, 2016 at 1:21 AM, <ruben [dot] vanparys [..] ... <mailto:ruben [dot] vanparys [..] ...>> wrote:
> Hi
>
> I have my own library which I built as a shared object (.so). How can I link
> this with my orocos component?
>
> Ruben
> --
> Orocos-Users mailing list
> Orocos-Users [..] ... <mailto:Orocos-Users [..] ...>
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users <http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users>
>

You could also look at the orocos_library() type macros in the UseOROCOS-RTT.cmake file in the rtt package.

https://github.com/orocos-toolchain/rtt/blob/master/UseOROCOS-RTT.cmake <https://github.com/orocos-toolchain/rtt/blob/master/UseOROCOS-RTT.cmake>

HTH
S