ubuntu下调试ffmpeg程序出现undefined reference to pthread_once ,undefined reference to uncompress错误

       Ubuntu(版本16.04)下默认配置编译Ffmpeg(版本4.1.3configure 添加选项--enable-threads),将编译好的ffmpeg库添加到程序

中进行编译出现undefined reference to pthread_once ,undefined reference  to uncompress 等错误,提版本示pthread_once

未定义原因是编译链接时找不到pthread_one。解决的方法是安装pthread并将它链接到程序。具体安装的命令是:

 sudo apt-get install manpages-posix manpages-posix-dev

安装后pthread动态库所在的路径为/usr/lib/x86_64-linux-gnu

undefined reference  to uncompress 错误的原因是缺少zlib库或者zlib库未链接到程序中。

如需交流可加QQ群766718184 或者QQ3501870

猜你喜欢

转载自www.cnblogs.com/wanggang123/p/10848210.html