码迷,mamicode.com
首页 > 其他好文 > 详细

【DirectX SDK Extra】提示缺少Qedit.h问题 (转)

时间:2017-05-01 00:26:51      阅读:306      评论:0      收藏:0      [点我收藏+]

标签:lte   ack   ice   .com   pil   base   百度搜索   file   exe   

原文转自 http://blog.csdn.net/joeblackzqq/article/details/10944005

 

DirectX 9.0 SDK 开发包以及扩展包下载(February 2005) http://dev.csdn.net/article/62/62941.shtm。直接到微软官网下的话,需要validation确认。

http://download.microsoft.com/download/7/b/9/7b92308a-ec8d-4016-8d45-2f91dd130bf2/dxsdk_feb2005.exe

http://download.microsoft.com/download/d/9/1/d91c44b9-fbac-4e8e-bee1-4a75777923ec/dxsdk_feb2005_extras.exe

dshow.h找不到,下个dxsdk extras就可以了。

qedit.h里面dxtrans.h missing的问题很诡异,March2008的版本依然存在这个问题,看看这篇文章http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2617687&SiteID=1

①Remove anything to do with "dxtrans.h" and "IDXEffect" .

Say, for file "qedit.h"

//#include "dxtrans.h" -- Line 498

// IDxtCompositor //: public IDXEffect -- Line 837
// IDxtAlphaSetter //: public IDXEffect -- Line 1151
// IDxtJpeg //: public IDXEffect -- Line 1345
// IDxtKey //: public IDXEffect -- Line 1735

Now, everything compiles and works fine.

 

这篇介绍direcX的配置: http://hi.baidu.com/rain_yx/blog/item/f98d9112695a8fcac2fd782c.html

 

You can get by with less edits of qedit.h (commenting out the missing interfaces can be error prone).

Comment out the include of dxtrans.h.

Before you include qedit.h, add the following #defines:

#define

__IDxtCompositor_INTERFACE_DEFINED__

#define

__IDxtAlphaSetter_INTERFACE_DEFINED__

#define

__IDxtJpeg_INTERFACE_DEFINED__

#define

__IDxtKey_INTERFACE_DEFINED__

#include

 

<qedit.h>


=====================================================================

以下为个人整理:

最初提示缺少Qedit.h, 这个需要安装DirectX SDK Extra, 下载后解压到一个临时目录,里面的主要内容是一个文件夹:Extras。我将它与我的DirectX SDK中的Extras对比了下,发现就是多了一个目录:DirectShow,将里面的DirectShow复制到DirectX SDK安装目录下的Extras下,里面就有qedit.h文件。将“D:\opensource\DirectXSDK\Extras\DirectShow\Include”加入到工程的include目录中,提示变为:无法找到dxtrans.h文件,经网上搜索,找到答案:
在#include <Qedit.h>前加上以下内容:

 

#pragma include_alias("dxtrans.h", "qedit.h")
#define __IDxtCompositor_INTERFACE_DEFINED__
#define __IDxtAlphaSetter_INTERFACE_DEFINED__
#define __IDxtJpeg_INTERFACE_DEFINED__
#define __IDxtKey_INTERFACE_DEFINED__

 

再编译,提示:

1>CaptureVideo.obj : error LNK2001: 无法解析的外部符号 _IID_ISampleGrabberCB  
1>CaptureVideo.obj : error LNK2001: 无法解析的外部符号 _IID_ICreateDevEnum  
1>CaptureVideo.obj : error LNK2001: 无法解析的外部符号 _CLSID_SystemDeviceEnum  
1>CaptureVideo.obj : error LNK2001: 无法解析的外部符号 _CLSID_VideoInputDeviceCategory  
1>CaptureVideo.obj : error LNK2001: 无法解析的外部符号 _CLSID_SampleGrabber  
1>CaptureVideo.obj : error LNK2001: 无法解析的外部符号 _MEDIATYPE_Video  
1>CaptureVideo.obj : error LNK2001: 无法解析的外部符号 _MEDIASUBTYPE_RGB24  
1>CaptureVideo.obj : error LNK2001: 无法解析的外部符号 _PIN_CATEGORY_PREVIEW  
1>CaptureVideo.obj : error LNK2001: 无法解析的外部符号 _PIN_CATEGORY_CAPTURE  
1>CaptureVideo.obj : error LNK2001: 无法解析的外部符号 _IID_IBaseFilter  
1>CaptureVideo.obj : error LNK2001: 无法解析的外部符号 _IID_IGraphBuilder  
1>CaptureVideo.obj : error LNK2001: 无法解析的外部符号 _CLSID_FilterGraph  
1>CaptureVideo.obj : error LNK2001: 无法解析的外部符号 _IID_ICaptureGraphBuilder2  
1>CaptureVideo.obj : error LNK2001: 无法解析的外部符号 _CLSID_CaptureGraphBuilder2  
1>CaptureVideo.obj : error LNK2001: 无法解析的外部符号 _IID_IMediaControl  
1>CaptureVideo.obj : error LNK2001: 无法解析的外部符号 _IID_IVideoWindow  
1>D:\program\vc2010\testa\testa.exe : fatal error LNK1120: 16 个无法解析的外部命令

很明显,是缺少相应的lib库文件,随便找一个如“_IID_ISampleGrabberCB” 进行百度搜索,即可发现需要加上“strmiids.lib”。不过,添加这个lib文件前,需要将其库目录(D:\opensource\DirectXSDK\Extras\DirectShow\Lib\x86)添加到项目属性中。

 

【DirectX SDK Extra】提示缺少Qedit.h问题 (转)

标签:lte   ack   ice   .com   pil   base   百度搜索   file   exe   

原文地址:http://www.cnblogs.com/happykoukou/p/6790732.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!