directshow 遇到的问题

我搞了一个视频抓帧的程序,其中qedit.h文件与D3D 的文件有问题; 
具体是d3dx9.h D3DApp.h D3DFont.h 与qedit.h不能共存,出现一下错误: 
should not include d3dtypes.h when compiling for DX8 or newer interfaces 
D:\DXSDK\Include\d3drmobj.h(46) : warning C4005: 'WIN_TYPES' : macro redefinition 
        D:\DXSDK\Include\dxfile.h(48) : see previous definition of 'WIN_TYPES' 
D:\DXSDK\Include\d3drmobj.h(274) : error C2061: syntax error : identifier 'LPDIRECT3D' 
D:\DXSDK\Include\d3drmobj.h(299) : error C2061: syntax error : identifier 'LPDIRECT3DDEVICE' 
D:\DXSDK\Include\d3drmobj.h(314) : error C2061: syntax error : identifier 'LPDIRECT3D' 
D:\DXSDK\Include\d3drmobj.h(339) : error C2061: syntax error : identifier 'LPDIRECT3DDEVICE' 
D:\DXSDK\Include\d3drmobj.h(344) : error C2061: syntax error : identifier 'LPDIRECT3D2' 
D:\DXSDK\Include\d3drmobj.h(348) : error C2061: syntax error : identifier 'LPDIRECT3DDEVICE2' 
D:\DXSDK\Include\d3drmobj.h(363) : error C2061: syntax error : identifier 'LPDIRECT3D' 
D:\DXSDK\Include\d3drmobj.h(388) : error C2061: syntax error : identifier 'LPDIRECT3DDEVICE' 
D:\DXSDK\Include\d3drmobj.h(393) : error C2061: syntax error : identifier 'LPDIRECT3D2' 
D:\DXSDK\Include\d3drmobj.h(397) : error C2061: syntax error : identifier 'LPDIRECT3DDEVICE2' 
D:\DXSDK\Include\d3drmobj.h(454) : error C2061: syntax error : identifier 'LPDIRECT3DVIEWPORT' 
D:\DXSDK\Include\d3drmobj.h(500) : error C2061: syntax error : identifier 'LPDIRECT3DVIEWPORT' 
D:\DXSDK\Include\d3drm.h(74) : error C2061: syntax error : identifier 'LPDIRECT3D' 
D:\DXSDK\Include\d3drm.h(156) : error C2061: syntax error : identifier 'LPDIRECT3D2' 
D:\DXSDK\Include\d3drm.h(240) : error C2061: syntax error : identifier 'LPDIRECT3D2' j

解决方法:

#include "stdafx.h"的下一行,加上#define __D3DRM_H__ 就好了

 

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值