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群1038388075,766718184 或者QQ3501870