全网首发:编译ffmpeg: error: ‘VFW_E_NOT_FOUND‘ undeclared ; did you mean ‘NTE_NOT_FOUND‘?
  KyPPydTkaOEe 2023年11月02日 61 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 <w32api/vfwmsgs.h>
【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年11月08日 0

暂无评论

推荐阅读
  HE3leaVn7jMN   2023年11月24日   31   0   0 Timei++#include
  HE3leaVn7jMN   2023年11月26日   30   0   0 i++#include
  lG7RE7vNF4mc   2023年11月13日   32   0   0 默认值html搜索
KyPPydTkaOEe