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

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

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

未定义原因是编译链接时找不到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

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄