ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
4

Undefined reference for string constant in service

asked 2012-11-29 05:41:09 -0500

Markus Achtelik gravatar image

updated 2012-11-29 05:49:01 -0500

Hi,

when I define a simple service, e.g.

string my_string
string CONST_STRING=some_value
---

I get an undefined reference to ...::CONST_STRING during linking. Looking at the generated header file, I noticed that CONST_STRING gets declared, but never defined. I tested the same with messages, here it works fine and I can see the definition of CONST_STRING.

The same applies for floatXX-- I guess that problem exists for every constant that can not be encoded into an enum.

Am I doing something wrong,or is this a bug in gensrv? I'm working with Fuerte

Thanks a lot for your help!

Markus

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2012-11-29 23:40:19 -0500

Markus Achtelik gravatar image
edit flag offensive delete link more

Comments

I think nowadays, after everything was moved to github, the ticket should be filed here.

Lorenz gravatar image Lorenz  ( 2012-11-29 23:46:53 -0500 )edit

filed here now as well https://github.com/ros/gencpp/issues/2 . Hope it's in the right place now ;)

Markus Achtelik gravatar image Markus Achtelik  ( 2012-11-30 00:37:53 -0500 )edit
Markus Achtelik gravatar image Markus Achtelik  ( 2013-06-01 02:24:18 -0500 )edit
1

answered 2012-11-29 05:56:23 -0500

dornhege gravatar image

updated 2012-11-29 05:56:53 -0500

Looks like a bug to me, which you should report.

I can also confirm that.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-11-29 05:41:09 -0500

Seen: 533 times

Last updated: Nov 29 '12