Ask Your Question
0

Undefined reference to callback function in subscriber

asked 2016-10-21 09:36:20 -0500

ROSfc gravatar image

updated 2016-10-21 09:36:37 -0500

I am trying to use callback inside a class, is this possible for indigo version ?

I have double and triple checked my syntax and I have run out of ideas why the compiler complains, undefined reference to foo::callback

any advice on where to look would be helpful.

edit retag flag offensive close merge delete

Comments

This is definitely possible, and Indigo has not changed anything wrt this.

crystal.ball.net is down at the moment, could you please include a C++ snippet that shows your callback method, and where you instantiate your subscriber? And your CMakeLists.txt, seeing as you post a linker error.

gvdhoorn gravatar image gvdhoorn  ( 2016-10-21 09:45:10 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-10-21 09:59:06 -0500

ROSfc gravatar image

@gvdhoom thank you for insisting it would be a syntax issue. After trying to find the bug and staring at the screen it just turns out that in my member function definition instead of void foo::callback(..) I just had void callback( .. ). I kept looking at the subscriber syntax. *facepalm

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-10-21 09:36:20 -0500

Seen: 542 times

Last updated: Oct 21 '16