一些directx Show例子在visual studio 2005 中编绎的问题

转载 2007年09月15日 09:50:00

Some DirectShow Samples Break in Visual Studio 2005
[Note: This post applies to the Platform SDK for Windows Server 2003 SP1 and Server 2003 R2. These issues were fixed in the Windows SDK for Vista.] 

Some of the DirectShow samples break if you install Visual Studio 2005 Beta 2. Most of the errors that I found fall into three categories:

C4430: Missing type specifier. To conform with C++, undeclared types do not default to int. All types must be declared. Fix: Declare the type, or suppress the warning with the "/wd4430" flag.
C4996: ' xxxx' was declared deprecated. You may be including an older version of strsafe.h from the DirectX SDK or the Platform SDK. You should include the version installed with Visual Studio. (But it's probably harmless to ignore this warning.) 
C2065: 'xxx': undeclared identifier. To conform with C++, the scope of a variable declared inside a "for" loop is restricted to the loop. Fixes: (a) Move the declaration outside the for loop. (b) Redeclare the variable in multiple scopes, if you don't need it to persist outside the loop. (c) Set the /Zc:forScope flag. (You can find this under Project, Properties, Configuration Properties, C/C++, Language, Force Conformance In For Loop Scope. Set to "No".)
Here are the specific fixes that I made. Warning: I have not thoroughly tested these, and I only tried them under the "Windows XP 32-bit Debug" environment in Platform SDK. You should use your own judgment before making any of these fixes.

BaseClasses/ctlutil.h (278)  
    (LONG) operator=(LONG);
BaseClasses/wxdebug.cpp (564)
    static DWORD g_dwLastRefresh = 0;
BaseClasses/winutil.cpp (2092)
   UINT Count;
   for (Count = 0;Count < Result;Count++) {
 BaseClasses/outputq.cpp (635)
   long iDone = 0;
   for (iDone = 0;
Capture/AmCap/amcap.cpp (691)
    for(int i = 0; i < NUMELMS(gcap.rgpmAudioMenu); i++)
Capture/AmCap/amcap (2795)
    for(int i = 0; i < NUMELMS(gcap.rgpmAudioMenu); i++)
DMODemo/dsutil.cpp (686)
    DWORD i = 0;
    for( i=0; i<m_dwNumBuffers; i++ )
dmoimpl.h (622)   [In the Platform SDK headers]
    for (DWORD dw = 0; dw < NUMBEROFOUTPUTS; dw++) {
DMO/GargleDMO/MedParamBase/param.cpp (91)
    for (DWORD dwIndex = 0; dwIndex < cParams; dwIndex++)
DMO/GargleDMO/MedParamBase/param.cpp (309)
    CCurveItem *pCurve = NULL;
    for (pCurve = pCurveHead;
DMO/GargleDMO/gargle.cpp (145)
    for (DWORD i = 0; i < cOutputStreams && SUCCEEDED(hr); ++i)
Filters/Dump/dump.cpp (426)
    for (int Loop = 0;Loop < (DataLength % BYTES_PER_LINE);Loop++)
Filters/Gargle/gargle.cpp (212)
    static int m_nInstanceCount; // total instances
Filters/RGBFilters/RateSource/ratesource.cpp (382)
    for( int y = 0 ; y < DEFAULT_HEIGHT ; y++ )
Filters/RGBFilters/RateSource/ratesource.cpp (387)
    for( int y = 0 ; y < DEFAULT_WIDTH ; y++ )
VMR/VMRXclBasic and VMR/Ticker: LNK1181: cannot open input file 'dxguid.lib'. This was an error in the makefile. Change to read:
    DXLIB="$(DXSDK_DIR)/Lib/x86"  (currently says "x32")
VMR/VMRXcl and VMR/VMRMulti: C1083: Cannot open include file: 'd3dxmath.h': No such file or directory. This is an old DX header that is no longer included in DX or in Visual Studio. Unfortunately the only fix is to download an older version of the DirectX SDK.
VMR9/MultiVMR9/GamePlayer/character.cpp (383)
    DWORD i = 0;
    for (i = 0; i < pMeshContainer->NumInfl; ++i)
VMR9/MultiVMR9/DLL/MixerControl.h (28)
    static const DWORD MultiVMR9Mixer_DefaultFVF = D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX1;
VMR9/VMRAllocator: error LNK2019: unresolved external symbol "wchar_t * __stdcall _com_util::ConvertStringToBSTR(char const *)" (etc).  Add this to the makefile:
    LINK32_LIBS = /
    comsuppw.lib /
    shell32.lib / 

相关文章推荐

Visual Studio 2005 不能单步调试的问题

转自:http://hi.baidu.com/daihaipengdhp/blog/item/aa88906eebcdecdc81cb4a09.html 单步调试时出错,原来的断点处显示一个空心圆加一...

Visual Studio 2005在IIS7下无法开启Debug的问题

很遗憾,这个问题始终无法解决,现摘录一篇不错的文章,尽管还是无法解决我的问题,但或许会对你有用。 http://mvolo.com/blogs/serverside/archive/2006/12/...
  • broze
  • broze
  • 2011年09月01日 13:57
  • 1758

Visual Studio 2005 移植 (札记之一)

From: http://blog.csdn.net/hylaking/article/details/1700475 Visual Studio 2005 移植 - WINVER,warning ...

Visual Studio 2005/2008中的快捷键与小技巧整理

---------------------------------------------------------------- 代码编写 ----------------------------...
  • txx9010
  • txx9010
  • 2012年01月12日 16:21
  • 260

抠出Visual Studio 2005中的Windows Mobile模拟器

抠出Visual Studio 2005中的Windows Mobile模拟器 近一段时间,我正在用Visual Studio 2005开发一个基于Pocket PC 2003的软件。Visual ...
  • gigipop
  • gigipop
  • 2011年10月13日 08:44
  • 288

Visual Studio 2005 创建Windows服务程序(C#)

http://www.cnblogs.com/ruiyi1987/archive/2009/07/30/1535291.htmlVisual Studio 2005 创建Windows服务程序(C#)...

Visual Studio 2005/2008/2010 简单更换配色主题(转自:http://apit.blogbus.com/logs/84846293.html)

其实原来也没有什么简单的办法直到出现了这个站点, studiostyles这个站点以导出的设置形式来提供支持 VS 2005/2008/2010的配色方案,并且有一个非常方便的工具用来制作自己的配色。...
  • lslxdx
  • lslxdx
  • 2011年03月25日 22:19
  • 1971

在Visual Studio 2005中安装Qt 4.3.2

http://www.cnblogs.com/lansh/archive/2007/11/29/952783.html 1.正常安装Visual Studio 2005,只要安装了C++即可. ...
  • helonSY
  • helonSY
  • 2011年12月08日 14:38
  • 375

visual studio 2005创建web项目的两种方式及二者区别

我们在用visual studio 2005创建web项目时,通常有两种方式,一个是通过WebApplication,一个是常见的website。 通过WebApplication来创建web项目:1...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:一些directx Show例子在visual studio 2005 中编绎的问题
举报原因:
原因补充:

(最多只允许输入30个字)