您当前的位置: 首页 >  ar

柳鲲鹏

暂无认证

  • 0浏览

    0关注

    4642博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

全网首发:编译ffmpeg: error: ‘VFW_E_NOT_FOUND‘ undeclared ; did you mean ‘NTE_NOT_FOUND‘?

柳鲲鹏 发布时间:2022-10-15 07:42:49 ,浏览量:0

  • 具体错误
libavdevice/dshow_filter.c:116:16: error: 'VFW_E_NOT_FOUND' undeclared (first use in this function); did you mean 'NTE_NOT_FOUND'?
         return VFW_E_NOT_FOUND;
                ^~~~~~~~~~~~~~~
                NTE_NOT_FOUND
  • 研究过程

这应该是WINDOWS特有的错误。于是搜索了一下,在这个文件中:

Windows Kits/8.0/Include/um/vfwmsgs.h:249:// MessageId: VFW_E_NOT_FOUND
Windows Kits/8.0/Include/um/vfwmsgs.h:255:#define VFW_E_NOT_FOUND                  ((HRESULT)0x80040216L)

试图加个include,找不到。首先,吾将这些文件直接复制到C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include(根据VS版本不同目录不同),就可以编译通过。

再搜索了一下cygwin:

./i686-pc-cygwin/sys-root/usr/include/w32api/vfwmsgs.h
./i686-w64-mingw32/sys-root/mingw/include/vfwmsgs.h
./include/w32api/vfwmsgs.h
./x86_64-w64-mingw32/sys-root/mingw/include/vfwmsgs.h

说明是有的。

  • 解决办法

在libavdevice/dshow_filter.c(或者libavdevice/dshow_capture.h)文件头部加个定义:

#include 

关注
打赏
1665724893
查看更多评论
立即登录/注册

微信扫码登录

0.0613s