0
点赞
收藏
分享

微信扫一扫

undefined reference to `__isoc99_sscanf'


参考文章:​​http://www.linuxquestions.org/questions/programming-9/undefined-reference-to-%60__isoc99_sscanf%27-873058/​​

原文关键内容:

You have glibc version prior to 2.7 installed, and are using libraries (ffmpeg?) which were compiled against glibc 2.7. The __isoc99_sscanf was added to glibc in version 2.7.

You'll need to check which static library file (*.a) refers to that symbol, and recompile it. You can use command


Code:



objdump -t path-to-library.a | grep -e __isoc99_sscanf


to find which library refers to that symbol.



Alternatively, you can upgrade your c library to version 2.7 or newer. If you're using Debian or Ubuntu, upgrading package 

libc6-dev  to at least 2.7 should be enough.



If the error message referred to an unversioned symbol (i.e. the error message did not refer to __isoc99_sscanf@@GLIBC...), then you could write a __isoc99_sscanf wrapper using stdargs and GNU sscanf (their differences being usually insignificant) and include that in the linking.


-------------------------------------------------------



错误:

undefined reference to `__isoc99_sscanf'

原因是我们的程序中使用的某个库,如xxx.a,  xxx.so是在高版本的glibc环境里面进行编译的。

有2种解决方法:

1. 升级我们的glibc到2.7版本

2. 找到xxx.a 或 xxx.so,在我们的系统里面重新编译,然后拿来使用即可。











举报

相关推荐

0 条评论