Deployment components inside a component (composition)

Dear all,
I am doing a component that load and configure other components.

so:

#include <ocl/DeploymentComponent.hp

DeploymentComponent *deployer;

deployer = new DeploymentComponent();

deployer->loadLibrary ("myComponent");

It complie but, on linking phase:

Linking CXX shared library libboardPuma260-gnulinux.so
CMakeFiles/boardPuma260.dir/src/boardPuma260-component.cpp.o: In
function `BoardPuma260::BoardPuma260(std::basic_string<char,
std::char_traits boardPuma260-component.cpp:(.text+0xb0): undefined reference to
`OCL::DeploymentComponent::DeploymentComponent(std::basic_string<char,
std::char_traits std::basic_string<char, std::char_traits >)'
CMakeFiles/boardPuma260.dir/src/boardPuma260-component.cpp.o: In
function `BoardPuma260::configureHook()':
boardPuma260-component.cpp:(.text+0x1c8): undefined reference to
`OCL::DeploymentComponent::loadLibrary(std::basic_string<char,
std::char_traits collect2: ld returned 1 exit status
make[2]: *** [libboardPuma260-gnulinux.so] Error 1
make[1]: *** [CMakeFiles/boardPuma260.dir/all] Error 2
make: *** [all] Error 2

What can I do to link the OCL::DeploymentComponent?

I genereted the "composite component" with orogen-pkg...

Regards,
Fabrizio

Deployment components inside a component (composition)

On Thu, Aug 9, 2012 at 12:20 PM, Fabrizio Boriero
<fabrizio [dot] boriero [..] ...> wrote:
> Dear all,
> I am doing a component that load and configure other components.
>
> so:
>
> #include <ocl/DeploymentComponent.hp

>
> DeploymentComponent *deployer;
>
> deployer = new DeploymentComponent();
>
> deployer->loadLibrary ("myComponent");
>
>
> It complie but, on linking phase:
>
> Linking CXX shared library libboardPuma260-gnulinux.so
> CMakeFiles/boardPuma260.dir/src/boardPuma260-component.cpp.o: In
> function `BoardPuma260::BoardPuma260(std::basic_string<char,
> std::char_traits<char>, std::allocator<char> > const&)':
> boardPuma260-component.cpp:(.text+0xb0): undefined reference to
> `OCL::DeploymentComponent::DeploymentComponent(std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >,
> std::basic_string<char, std::char_traits >>)'
> CMakeFiles/boardPuma260.dir/src/boardPuma260-component.cpp.o: In
> function `BoardPuma260::configureHook()':
> boardPuma260-component.cpp:(.text+0x1c8): undefined reference to
> `OCL::DeploymentComponent::loadLibrary(std::basic_string<char,
> std::char_traits<char>, std::allocator<char> > const&)'
> collect2: ld returned 1 exit status
> make[2]: *** [libboardPuma260-gnulinux.so] Error 1
> make[1]: *** [CMakeFiles/boardPuma260.dir/all] Error 2
> make: *** [all] Error 2
>
> What can I do to link the OCL::DeploymentComponent?
>
> I genereted the "composite component" with orogen-pkg...

Add to your cmakelists.txt file:

orocos_use_package(ocl-deployment)

Which will link your orocos_... targets with the deployment component.
It will also set CMAKE variables you can use in case you want to write
the link directives manually in your cmake files.

Peter