![编译:Scons找不到libav](https://linux22.com/image/85271/%E7%BC%96%E8%AF%91%EF%BC%9AScons%E6%89%BE%E4%B8%8D%E5%88%B0libav.png)
我不断收到的编译器错误是:
error: ‘CODEC_ID_HUFFYUV’ undeclared (first use in this function)
if (!codec) codec = avcodec_find_encoder(CODEC_ID_HUFFYUV);
^
error:‘PIX_FMT_YUV422P’ undeclared (first use in this function)
c->pix_fmt = PIX_FMT_YUV422P;
^
error: ‘PIX_FMT_YUV420P’ undeclared (first use in this function)
c->pix_fmt = PIX_FMT_YUV420P;
^
error: ‘CODEC_ID_FFV1’ undeclared (first use in this function)
if (c->codec_id == CODEC_ID_FFV1)
^
error: ‘PIX_FMT_RGB24’
这似乎是 libav 特定的。我已经安装了 ffmpeg,并且pkgconfig
在以下位置有适当的文件:
/usr/lib/pkgconfig/libavutil.pc
/usr/lib/pkgconfig/libavdevice.pc
/usr/lib/pkgconfig/libavcodec.pc
我不明白发生了什么事。
编辑 - 更多信息:
这些错误源于单个源文件,该文件具有
#if HAVE_LAVC
# include <inttypes.h>
# if HAVE_LIBAVCODEC_AVCODEC_H
# include <libavcodec/avcodec.h>
# else
# include <avcodec.h>
# endif
# if HAVE_LIBAVFORMAT_AVFORMAT_H
# include <libavformat/avformat.h>
# else
# include <avformat.h>
# endif