vs2010 没法打开包括文件:“streams.h”: No such file or directory

环境:64位Win7Sp1+VS2010

vs2010 没法打开包括文件:“streams.h”,这里提供两种解决方法。第一种是在已经安装VS2010的情况下,安装DirectShow,步骤多,中间还需要自己编译库文件,有些麻烦。第二种是重新搭建开发环境,先安装Win7SDK,再安装VS2010,操作起来比较简单。

方法一

1 下载Platform SDK

Microsoft Support搜索Win7 SDK(或Win10 SDK,选择自己需要的操作系统名称),在列表中找到一个很像的:

点开以后,是这样的:

上面给出了链接应该是下载地址了: https://www.microsoft.com/en-us/download/details.aspx?id=8279  ,再点进去是这样的:

2 安装

下载下来,发现是个在线安装程序(winsdk_web.exe),双击运行,全部默认安装,大概半小时以后,安装完成。安装位置应该是C:\Program Files\Microsoft SDKs\Windows\v7.1\

3 编译baseclasses

3.1 版本转换

来到C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\multimedia\directshow\baseclasses目录,双击baseclasses.sln打开解决方案。默认要用vs2005打开,但我只有vs2010,打开时转换成vs2010解决方案,出现18个警告,但没有错误。

3.2 编译Debug版本

改成Debug版本,x64平台,生成:

生成的文件在baseclasses目录下的Debug下:

把strmbasd.lib文件拷贝到C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib

3.3 编译Release版本

改成Release版本,x64平台,生成:

生成的文件在baseclasses目录下的x64/Release下:

找到x64/Release/strmbase.lib文件,拷贝到C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib

4 配置vs2010

4.1 包含目录

在项目右键->“属性”->“配置属性”->“VC++目录”->“包含目录”中添加
C:\Program Files\Microsoft SDKs\Windows\v7.1\include

4.2 库目录

在项目右键->“属性”->“配置属性”->“VC++目录”->“库目录”中添加
C:\Program Files\Microsoft SDKs\Windows\v7.1\lib

4.3 附加依赖库

在项目右键->“属性”->“配置属性”->“链接器”->“输入”->“附加依赖库”添加:strmiids.lib

5 结束

查看项目中的#include <stream.h>已经不错了。


方法二:

先下载安装windows SDK,因为现在Windows的directshow的sdk已经集成到Windows sdk中了。

然后安装vs2010。

注:如果先安装vs2010要卸载后安装顺序安装

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
This error occurs when the system cannot find the "ffprobe" executable file. ffprobe is a multimedia stream analyzer tool that comes with the FFmpeg package. It is used to analyze multimedia streams and provide detailed information about the streams. To fix the error, you can try the following steps: 1. Install FFmpeg: If you don't have FFmpeg installed, install it first. You can download FFmpeg from their official website or use a package manager to install it. 2. Check the PATH environment variable: Make sure that the directory containing the "ffprobe" executable file is included in the PATH environment variable. You can check the PATH variable by running the following command in the terminal: echo $PATH If the directory containing "ffprobe" is not in the PATH, you can add it by editing the .bashrc or .bash_profile file in your home directory. 3. Check if the file exists: Check if the "ffprobe" executable file exists in the directory where it's supposed to be. You can do this by running the following command in the terminal: ls /path/to/ffprobe Replace "/path/to/ffprobe" with the actual path to the "ffprobe" executable file. 4. Set the path to ffprobe: If the "ffprobe" executable file exists in a different directory, you can specify the path to it in your code. For example: ffprobe_path = '/path/to/ffprobe' probe = ffmpeg.probe(video_path, cmd=ffprobe_path) By following these steps, you should be able to fix the "FileNotFoundError: [Errno 2] No such file or directory: 'ffprobe'" error.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值