您的位置:首页 > Web前端

undefined reference to `clock_nanosleep' 错误

2012-02-27 11:13 447 查看
when i include time.h file(/usr/include/time.h),in my program at compilation time i am getting following messages(errors)

I am expecting solution from u

/tmp/cc61O7TY.o(.text+0x10): In function `wait_code':

: undefined reference to `clock_gettime'

/tmp/cc61O7TY.o(.text+0x24): In function `wait_code':

: undefined reference to `timespec_add_ns'

/tmp/cc61O7TY.o(.text+0x36): In function `wait_code':

: undefined reference to `clock_nanosleep'

/tmp/cc61O7TY.o(.text+0x81): In function `wait_code':

: undefined reference to `clock_gettime'

/tmp/cc61O7TY.o(.text+0xa0): In function `wait_code':

: undefined reference to `timespec_add_ns'

/tmp/cc61O7TY.o(.text+0xb2): In function `wait_code':

: undefined reference to `clock_nanosleep'

/tmp/cc61O7TY.o(.text+0x132): In function `lock_code':

: undefined reference to `clock_gettime'

/tmp/cc61O7TY.o(.text+0x151): In function `lock_code':

: undefined reference to `timespec_add_ns'

/tmp/cc61O7TY.o(.text+0x163): In function `lock_code':

: undefined reference to `clock_nanosleep'

/tmp/cc61O7TY.o(.text+0x209): In function `main':

: undefined reference to `rtl_main_wait'

collect2: ld returned 1 exit status

use "-lrt" to resolve them... (I tried on ubuntu 6.10)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐