TransportPlugin.cpp:39: error: invalid conversion from ‘int’ to ‘const char*’

Dear sirs,

After having update yesterday orocos toolchain 2.3.1 I regenerate
my project without any modification to my defined data types and orogen definition file.

The project was succesfully built with the old toolchain, now
the command

make install

ends with errors on TransportPlugin.cpp.

Here below the generated warnings and errors:

/root/rock/Rosetta12A/.orogen/typekit/transports/typelib/TransportPlugin.cpp:39: warning: character constant too long for its type
.......

/root/rock/Rosetta12A/.orogen/typekit/transports/typelib/TransportPlugin.cpp: In constructor ‘orogen_typekits::rosettaTypelibTransportPlugin::rosettaTypelibTransportPlugin()’:
/root/rock/Rosetta12A/.orogen/typekit/transports/typelib/TransportPlugin.cpp:39: error: invalid conversion from ‘int’ to ‘const char*’
/root/rock/Rosetta12A/.orogen/typekit/transports/typelib/TransportPlugin.cpp:39: error: initializing argument 1 of ‘std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&amp;) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]’
make[2]: *** [.orogen/typekit/transports/typelib/CMakeFiles/rosetta-transport-typelib-xenomai.dir/TransportPlugin.cpp.o] Error 1
make[1]: *** [.orogen/typekit/transports/typelib/CMakeFiles/rosetta-transport-typelib-xenomai.dir/all] Error 2
make: *** [all] Error 2

Can you help me to get the code compiled?

Thank you.

G. Rizzi

TransportPlugin.cpp:39: error: invalid conversion from ‘int’ to

On Thursday 21 April 2011 23:20:54 gprizzi [..] ... wrote:
> Dear sirs,
>
> After having update yesterday orocos toolchain 2.3.1 I regenerate
> my project without any modification to my defined data types and orogen
> definition file.
>
> The project was succesfully built with the old toolchain, now
> the command
>
> make install
>
> ends with errors on TransportPlugin.cpp.
>
> Here below the generated warnings and errors:
>
> /root/rock/Rosetta12A/.orogen/typekit/transports/typelib/TransportPlugin.cp
> p:39: warning: character constant too long for its type .......
>
>
> /root/rock/Rosetta12A/.orogen/typekit/transports/typelib/TransportPlugin.cp
> p: In constructor
> ‘orogen_typekits::rosettaTypelibTransportPlugin::rosettaTypelibTransportPl
> ugin()’:
> /root/rock/Rosetta12A/.orogen/typekit/transports/typelib/TransportPlugin.c
> pp:39: error: invalid conversion from ‘int’ to ‘const char*’
> /root/rock/Rosetta12A/.orogen/typekit/transports/typelib/TransportPlugin.c
> pp:39: error: initializing argument 1 of ‘std::basic_string<_CharT,
> _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&amp;) [with
> _CharT = char, _Traits = std::char_traits<char>, _Alloc =
> std::allocator<char>]’ make[2]: ***
> [.orogen/typekit/transports/typelib/CMakeFiles/rosetta-transport-typelib-x
> enomai.dir/TransportPlugin.cpp.o] Error 1 make[1]: ***
> [.orogen/typekit/transports/typelib/CMakeFiles/rosetta-transport-typelib-x
> enomai.dir/all] Error 2 make: *** [all] Error 2
>
> Can you help me to get the code compiled?

This is bug #854. http://bugs.orocos.org/show_bug.cgi?id=854

For some reason, on some systems, cmake escapes quotes in the add_definitions()
macro.

Can you state your cmake version and Linux distro + version ?

I have pushed the fix that will work for you back to master+ toolchain-2.3
branch. So if you update, it will/should regenerate that typekit with the
correct code.

Peter
--
Orocos-Users mailing list
Orocos-Users [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users