2011年6月18日 星期六

Grab Sample of Video Stream - Compile Error

学习一下DirectShow,却發現DirectShow已从Directx 9.0 SDK中分离. 原來已經改在Platform SDK 中.  因此C++專案需要另外設定 include header and lib.

當编译一个範例程式,出现dxtrans.h找不到的错误時則要做以下處理:
1. 这里主要是DirectShow中的qedit.h包含了dxtrans.h。
首先是在qedit.h这个文件中将  #include "dxtrans.h"注释掉。可能在ProgramFiles/MicrosoftSDK/include中
2. 其次在你的程式中在#include  之前加下面的macro定义即可解決: 
#define __IDxtCompositor_INTERFACE_DEFINED__  #define __IDxtAlphaSetter_INTERFACE_DEFINED__  #define __IDxtJpeg_INTERFACE_DEFINED__   
#define __IDxtKey_INTERFACE_DEFINED__

沒有留言:

張貼留言