Vs2008中编译playwndASF的错误解决

Directshow  SDK中的 playwndasf 是一个播放器的例子,使用 VS2008 编译出现如下错误:

******************************************************************************************

PlayWndASF.cpp
urllaunch.cpp
Linking...
LINK : fatal error LNK1181: cannot open input file "../../common/wmstub.lib"
Error executing link.exe.

PlayWndASF.exe - 1 error(s), 0 warning(s)

******************************************************************************************

需要wmstub.lib 库支持,这个库从网上可以下到,不过需要注册的:

http://bbs.lmtw.com/dispbbs.asp?BoardID=102&ID=120939&replyID=7912&skin=1

拷贝到:  /DXSDK/Samples/C++/DirectShow/Common/  下面重新编译还存在上述错误。

进一步的解决办法是注释掉 keyprovider.cpp 中的如下语句:

//#pragma message("---------------------------------------------------------------------------------------")

//#pragma message("NOTE: To link and run this sample, you must install the Windows Media Format SDK 7.1.1.")

//#pragma message("/n")

//#pragma message("  After downloading the Format SDK, you can extract a public version of the")

//#pragma message("  WMStub.LIB library, which should be copied to the Samples//C++//DirectShow//Common folder.")

//#pragma message("  This library is necessary for enabling Windows Media content.")

//#pragma message("/n")

//#pragma message("  Without this library in the Common folder, the link will fail with:")

//#pragma message("      LNK1104: cannot open file '..//..//common//wmstub.lib'")

//#pragma message("/n")

//#pragma message("  If you remove the WMStub.lib from the project's linker settings, the linker")

//#pragma message("  will fail with this unresolved reference:")

//#pragma message("      WMCreateCertificate")

//#pragma message("---------------------------------------------------------------------------------------")

然后连接就会通过。

如果编译出现如下错误:

error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

这个和解决编译BaseClasses 的错误一样, 可以用wd4430 来解决;具体的在工程选项中的 c/c++ Command Line 中添加 /wd4430 即可。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值