DXSDK 9.0 + VS2005 + DirectShow 安装配置

  • 编译BaseClasses

路径:<DXSDK>/Samples/C++/DirectShow/BaseClasses

环境:VS2005
为了正确编译,需修改以下文件:
(a) ctlutil.h
D:/DXSDK/Samples/C++/DirectShow/BaseClasses/ctlutil.h
 
编译时提示错误:
BaseClasses/ctlutil.h(278) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
 
 修改:
    //operator=(LONG); //原代码
    COARefTime& operator=(LONG);
 
     改完这个之后,出现一堆错误,一个一个来改。
 
(b) wxdebug.cpp
d:/DXSDK/Samples/C++/DirectShow/BaseClasses/wxdebug.cpp
 
错误:
1>./wxdebug.cpp(567) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int

改:
        //static g_dwLastRefresh = 0;
        static DWORD g_dwLastRefresh = 0; //lspmodify
 
(c) winutil.cpp
d:/DXSDK/Samples/C++/DirectShow/BaseClasses/winutil.cpp
 
错误:
1>./winutil.cpp(2104) : error C2065: “Count”: 未声明的标识符

改:
    //for (UINT  Count = 0;Count < Result;Count++) 
    UINT Count; //lspmodify
   for (Count = 0;Count < Result;Count++) { //lspmodify
 
(d) outputq.cpp
d:/DXSDK/Samples/C++/DirectShow/BaseClasses/outputq.cpp
 
错误:
1>./outputq.cpp(664) : error C2065: “iDone”: 未声明的标识符

改:
     //for (long  iDone = 0;
long iDone; //lspmodify
for (iDone = 0; //lspmodify
 

  • VS2005环境配置

在vs2005下,选择菜单 Tools -> Options,左栏选择Projects and Solutions -> VC++ Directories

 

在弹出的对话框的"Show directories for"(显示以下内容的目录)中选择Include files(包含文件):

- include:
<DXSDK>/Include
<DXSDK>/Samples/C++/Common/Include
<DXSDK>/Samples/C++/DirectShow/BaseClasses

再在"Show directories for"中选择 Libraries files(库文件):
- lib:
<DXSDK>/lib
<DXSDK>/Samples/C++/Common/Src
<DXSDK>/Samples/C++/DirectShow/BaseClasses/Debug_Unicode
<DXSDK>/Samples/C++/DirectShow/BaseClasses/Release_Unicode

你可能感兴趣的:(c,include,tools)