win7 vs2010 配置directshow

下载DirectShow
由于现在directShow没有和direcxtx一起发布,而是和windows sdk 打包发布了,可以到官网下载最新的windows sdk 开发包。windows sdk 地址:http://www.microsoft.com/download/en/details.aspx?id=8442按系统类型下载。
GRMSDK_EN_DVD.iso x86
GRMSDKIAI_EN_DVD.iso Itanium
GRMSDKX_EN_DVD.iso 64位的amd cpu
如果你安装的是32位的windows 7,请下载x86
如果你安装的是64位的windows 7,请下载amd64 



配置DirectShow
下载安装好之后编译baseclasses项目,在C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\multimedia\directshow\baseclasses。以管理员身份选择不同的编译环境 (Debug,Debug_MBCS,Release,Release_MBCS)可以得到四个类型的strmbasd.lib,开发项目时选择相应Debug版本的strmbasd.lib。


在项目中包含(1.选择任意项目2.切换到属性管理器3.点击Debug/Release里的Microsoft.Cpp.Win32.user)

注意包含顺序

C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\multimedia\directshow\baseclasses
C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\multimedia\directshow\common

C:\Program Files\Microsoft SDKs\Windows\v7.1\Include
以及lib:
C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib
C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\multimedia\directshow\baseclasses\Debug

C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\multimedia\directshow\baseclasses\Release


编译错误(如果头文件顺序不对,出现如下编译错误):

主要提示如下:
1>e:\microsoft sdks\windows\v6.0\samples\multimedia\directshow\baseclasses\refclock.h(80) : error C2061: syntax error : identifier ''CAMSchedule''
1>e:\microsoft sdks\windows\v6.0\samples\multimedia\directshow\baseclasses\refclock.h(139) : error C2143: syntax error : missing '';'' before ''*''
1>e:\microsoft sdks\windows\v6.0\samples\multimedia\directshow\baseclasses\refclock.h(139) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\microsoft sdks\windows\v6.0\samples\multimedia\directshow\baseclasses\refclock.h(139) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\microsoft sdks\windows\v6.0\samples\multimedia\directshow\baseclasses\refclock.h(139) : warning C4183: ''GetSchedule'': missing return type; assumed to be a member function returning ''int''
1>e:\microsoft sdks\windows\v6.0\samples\multimedia\directshow\baseclasses\refclock.h(178) : error C2143: syntax error : missing '';'' before ''*''
1>e:\microsoft sdks\windows\v6.0\samples\multimedia\directshow\baseclasses\refclock.h(178) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\microsoft sdks\windows\v6.0\samples\multimedia\directshow\baseclasses\refclock.h(178) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\microsoft sdks\windows\v6.0\samples\multimedia\directshow\baseclasses\refclock.h(139) : error C2065: ''m_pSchedule'' : undeclared identifier
1>e:\microsoft sdks\windows\v6.0\samples\multimedia\directshow\baseclasses\refclock.h(166) : error C2227: left of ''->GetEvent'' must point to class/struct/union/generic type
1>        type is ''''unknown-type''''

你可能感兴趣的:(directshow)