Ask Your Question
1

ROSserial can't find clock_gettime

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

cmeaclem gravatar image

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 -0500

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

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: 2013-11-14 08:41:35 -0500

Seen: 221 times

Last updated: Nov 15 '13