Hi All I am trying to create typekit for my custom class using typegen, actually I am trying a simple class with three member variables integer, double, and string. not complex I just want to try how it is working with the typekit generator.
Then, I have a file.h contains my class, using typegen command
typegen -o types TestProject file.h
which is suppose to create a directory types which contains all necessary files to build the typekit with name TestProject for my class which is defined in file.h.
after that, I open types directory and run:
CMAKE_INSTALL_PREFIX=/opt/orocos CMAKE_PREFIX_PATH=/opt/orocos cmake .
followed by
make install
But I got an Error said that my class has been redefined in two files, and after checking both files, i found both are the same file but they are like shortcut to the original file.h
I don't understand what is going on, can anyone Explain what is the procedure of this functionality then I will try to figure how to solve this issue, or may be i am doing something wrong?
Thanks,
typegen Orocos Toochain
Hi all,
The very first idea that comes to my mind is that you might have forgot
to avoid multiple declaration:
#ifndef _WHATEVER_HPP_
#define _WHATEVER_HPP_
.... class declaration ...
#endif
Cheers, Gianni.
On 06/26/2015 03:52 AM, alaaeldeen [dot] abdalrahman [..] ... wrote:
> Hi All
> I am trying to create typekit for my custom class using typegen, actually I
> am trying a simple class with three member variables integer, double, and
> string. not complex I just want to try how it is working with the typekit
> generator.
>
> Then, I have a file.h contains my class, using typegen command
>
> typegen -o types TestProject file.h
>
> which is suppose to create a directory types which contains all necessary
> files to build the typekit with name TestProject for my class which is
> defined in file.h.
>
> after that, I open types directory and run:
>
> CMAKE_INSTALL_PREFIX=/opt/orocos CMAKE_PREFIX_PATH=/opt/orocos cmake .
>
> followed by
>
> make install
>
> But I got an Error said that my class has been redefined in two files, and
> after checking both files, i found both are the same file but they are like
> shortcut to the original file.h
>
> I don't understand what is going on, can anyone Explain what is the procedure
> of this functionality then I will try to figure how to solve this issue, or
> may be i am doing something wrong?
>
> Thanks,
>
typegen Orocos Toochain
You are right, and I figured that after sending the post. it was because I just want to try the typegen method which is not working after all!!