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

ROSserial can't find clock_gettime

asked 2013-11-14 08:41:35 -0600

anonymous user

Anonymous

Hi All,

I have been trying to compile the rosserial example "HelloROS" for embedded linux, but to no avail.

There are undefined references to "clock_gettime" however i have found the prototypes in time.h - here they are defined as extern's.

extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW;

I believe the time library is linking, it has been included in EmbeddedLinuxHardware.h.

Do I have to write the clock_gettime function myself?

Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-11-15 00:21:59 -0600

Depending on your setup, clock_gettime may be in libc, or it may be in librt.

Try adding -lrt as a link flag and see if that clears things up.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-11-14 08:41:35 -0600

Seen: 380 times

Last updated: Nov 15 '13