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)
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)
相关文章推荐
- undefined reference to `clock_gettime' 链接错误问题解决
- undefined reference to `clock_gettime' 链接错误问题解决
- 编译错误:undefined reference to `clock_gettime'
- 使用opencv 2.2静态库时: undefined reference to `clock_gettime' 链接错误问题解决
- undefined reference to `clock_gettime' 链接错误问题解决(转)
- FC14下错误 /usr/bin/ld: libvalhalla-test.o: undefined reference to symbol 'clock_gettime@@GLIBC_2.2'
- undefined reference to `clock_gettime' 链接错误问题解决
- undefined reference to `clock_gettime' 链接错误的解决方案
- Uboot编译出下如下错误的一个原因:In function `__aeabi_ldiv0': (.text+0x8): undefined reference to `raise'
- 编译程序出现 undefined reference to `__gxx_personality_v0' 错误
- 编译Ralink SDK时碰到的奇怪错误(undefined reference to `main')的解决办法
- 奇怪的undefined reference to `QString::free(QString::Data*)'链接错误
- gcc 编译错误:"undefined reference to 'sqrt'
- CentOS6下Sphinx2.1.9编译错误undefined reference to 'libiconv'
- "undefinedreference to '__gxx_personality_v0' " 错误
- gcc 共享库的时候显示.../crt1.o: In function `_start': (.text+0x18): undefined reference to `main'的错误
- 连接错误undefined reference to `pthread_create'
- TORNADO下编译出现undefined reference to `itoa'错误
- 出现undefined reference to `forkpty' 错误解决方法
- register.o: undefined reference to symbol 'gpg_strerror'编译错误的解法