您的位置:首页 > Web前端

FC14下错误 /usr/bin/ld: libvalhalla-test.o: undefined reference to symbol 'clock_gettime@@GLIBC_2.2'

2011-11-30 10:23 776 查看
转自 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=601022

Linux(FC14)下编译程序时出现下面的问题:

/usr/bin/ld: libvalhalla-test.o: undefined reference to symbol
'clock_gettime@@GLIBC_2.2'
/usr/bin/ld: note: 'clock_gettime@@GLIBC_2.2' is defined in
DSO /lib/librt.so.1 so try adding it to the linker command line
/lib/librt.so.1: could not read symbols: Invalid operation
collect2: ld returned 1 exit status


This means that libvalhalla-test has to be linked explicitly with librt,
thus the fix proposed before (another one is to add explictly -lrt in
the corresponding Makefile).


网上的说法是在makefile中加上 -lrt , 试过,确实可以。。。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐