开发directshow碰到的错误

来源:互联网 发布:ubuntu unmount 编辑:程序博客网 时间:2024/04/28 01:36

在用VC++.net2005 SmartDevice,windows mobile5.0开发dshow时,经常会碰到这样一些错误,在这里把它们总结出来:
1.Please use the /MD switch for _AFXDLL buildsPlease use the /MD switch for _AFXDLL builds
 解决办法:
 将project->properity->c/c++->Code   Generation->Use Run-time liberary改为 Multithreaded   DLL.

2.error LNK2001: unresolved external symbol "public: virtual unsigned long __cdecl CBaseFilter::NonDelegatingRelease(void)" (?NonDelegatingRelease@CBaseFilter@@UAAKXZ) 
解决办法:
  将project->properity->c/c++-> Language->Treat wchar_t as Built-in Type设为NO(/Zc:wchar_t-).

    但这时会出现一个问题,用MFC时,release没有错误,但是debug会出现问题,这时可以这样做:
  #ifdef DEBUG
STDMETHODIMP_(ULONG) NonDelegatingRelease() 
{

 Return ULONG(0);

}
#endif