本文介绍了未定义对符号'timer_settime @@ GLIBC_2.3.3的引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

操作系统:Linux

OS: Linux

我正在尝试链接mips64-softmmu/qemu-system-mips64,但导致错误:

I am trying to link mips64-softmmu/qemu-system-mips64 but it results into error:

./slirp/misc.o: In function `memset':
/usr/include/bits/string3.h:81: warning: memset used with constant zero length parameter;
this could be due to transposed parameters
/usr/bin/ld: ../qemu-timer.o: undefined reference to symbol 'timer_settime@@GLIBC_2.3.3'
/usr/bin/ld: note: 'timer_settime@@GLIBC_2.3.3' is defined in DSO /lib64/librt.so.1 so   try adding it to the linker command line

/lib64/librt.so.1: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[1]: *** [qemu-system-mips64] Error 1
make: *** [subdir-mips64-softmmu] Error 2

有人可以建议我如何解决这个问题.

Can anyone suggest me how can i solve this issue.

推荐答案

通过添加两个文件MakefileMakefile.target来解决问题

Issue is solved by editing two files, Makefile and Makefile.target by adding

LIBS+=-lz -lrt -lm

这篇关于未定义对符号'timer_settime @@ GLIBC_2.3.3的引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 19:30