DirectShow Filter

I tried to port the sample of DirectShow, AsyncFilter, to Windows Mobile 2005 Pocket PC. I added Strmbase.lib to project library list, but still has some symbols that do not get resolved.



AsyncFilter.obj :error LNK2001: unresolved external symbol "public:virtuallong __cdecl CBaseFilter::FindPin(wchar_tconst *,struct IPin * *)" (?FindPin@CBaseFilter@@UAAJPB_WPAPAUIPin@@@Z)
AsyncReader.obj :error LNK2001: unresolved external symbol "public:virtuallong __cdecl CBaseFilter::FindPin(wchar_tconst *,struct IPin * *)" (?FindPin@CBaseFilter@@UAAJPB_WPAPAUIPin@@@Z)
AsyncFilter.obj :error LNK2001: unresolved external symbol "public:virtuallong __cdecl CBaseFilter::JoinFilterGraph(struct IFilterGraph *,wchar_tconst *)" (?JoinFilterGraph@CBaseFilter@@UAAJPAUIFilterGraph@@PB_W@Z)
AsyncReader.obj :error LNK2001: unresolved external symbol "public:virtuallong __cdecl CBaseFilter::JoinFilterGraph(struct IFilterGraph *,wchar_tconst *)" (?JoinFilterGraph@CBaseFilter@@UAAJPAUIFilterGraph@@PB_W@Z)
AsyncFilter.obj :error LNK2001: unresolved external symbol "public:virtuallong __cdecl CBaseFilter::QueryVendorInfo(wchar_t * *)" (?QueryVendorInfo@CBaseFilter@@UAAJPAPA_W@Z)
AsyncReader.obj :error LNK2001: unresolved external symbol "public:virtuallong __cdecl CBaseFilter::QueryVendorInfo(wchar_t * *)" (?QueryVendorInfo@CBaseFilter@@UAAJPAPA_W@Z)

CBaseFilter should be in Strmbase.lib. Anyone could give me a hint about this? Thanks.

[3450 byte] By [shian] at [2008-2-16]
# 1
Hi Shian,

Strmbase.lib is one of the libraries that must be added to the project library list in order to build a DirectShow filter, however there are also some additional steps that must be taken in order to properly setup the build environment. Please refer to the link below for the detailed steps:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcemultimedia5/html/wce50conbuildingdirectshowfilters.asp

Thanks,

Aaron Cheng
Program Manager
Windows CE - Graphics & Multimedia

AaronCheng at 2007-9-9 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...
# 2
Hi Shian,

Strmbase.lib is one of the libraries that must be added to the project library list in order to build a DirectShow filter, however there are also some additional steps that must be taken in order to properly setup the build environment. Please refer to the link below for the detailed steps:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcemultimedia5/html/wce50conbuildingdirectshowfilters.asp

Thanks,

Aaron Cheng
Program Manager
Windows CE - Graphics & Multimedia

AaronCheng at 2007-9-9 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...
# 3
Hi

I'm trying to follow these extra instructions through but have hit the problem that I can't seem to find where to set the __stdcall option - where is this in Visual Studio 2005 (currently I'm still running with Beta 2 but pressures of work allowing I will be upgrading in the next few days...)

Thanks

Stuart

StuartLodge at 2007-9-9 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...
# 4
I am having the same problem. The mangled signature in the delivered strmbase.lib in the pocketpc SDK is this:
0CTransInPlaceFilter@@QAA@PAGPAUIUnknown@@ABU_GUID@@PAJ@Z

while VC2005 and the delivered WM5 headers generate this:
0CTransInPlaceFilter@@QAA@PA_WPAUIUnknown@@ABU_GUID@@PAJ@Z

Is there a compiler option to fix that? If not, where are these base classes for CE5 publicly available?

AndresMeyer at 2007-9-9 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...
# 5
When trying to compile the baseclasses from the ce5 PB, I run into problems (scope of vars, slightly different headers in the WM5 sdk than in CE5 etc). Surely there must be a working Strmbase.lib and streams.h combination out there for WM5, it cannot be that I have to go fix the CE5 stuff to work with VS2005/WM5?

The first few errors when trying to compile the CE5 BaseClasses in a WM5 PPC project:

Error 1 error C2065: 'iDone' : undeclared identifier c:\Documents and Settings\ameyer\My Documents\Visual Studio 2005\Projects\BASECLASSES\outputq.cpp 669
Error 2 error C2039: 'Peek' : is not a member of 'CRendererSampleQueue' c:\Documents and Settings\ameyer\My Documents\Visual Studio 2005\Projects\BASECLASSES\renbaseasync.cpp 413
Error 3 error C2039: 'Peek' : is not a member of 'CRendererSampleQueue' c:\Documents and Settings\ameyer\My Documents\Visual Studio 2005\Projects\BASECLASSES\renbaseasync.cpp 433
Error 4 error C2039: 'Peek' : is not a member of 'CRendererSampleQueue' c:\Documents and Settings\ameyer\My Documents\Visual Studio 2005\Projects\BASECLASSES\renbaseasync.cpp 548
Error 5 error C2039: 'Compact' : is not a member of 'CAggDirectDraw' c:\Documents and Settings\ameyer\My Documents\Visual Studio 2005\Projects\BASECLASSES\videoctl.cpp 124
Error 6 error C2065: 'm_pDirectDraw' : undeclared identifier c:\Documents and Settings\ameyer\My Documents\Visual Studio 2005\Projects\BASECLASSES\videoctl.cpp 126
Error 7 error C2227: left of '->Compact' must point to class/struct/union/generic type c:\Documents and Settings\ameyer\My Documents\Visual Studio 2005\Projects\BASECLASSES\videoctl.cpp 127

AndresMeyer at 2007-9-9 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...
# 6
Here's how I solved my issues after a few days of frustration....

1. In the compiler options turn off the new "Treat wchar_t as type" option - this gets rid of most of the problems - unless you are linking with (for example) MFC which needs this option set.

2. The one remaining link error is a symbol (can't remember which one) that simply doesn't exist in the debug build - so I've switched to the release build and am working in that instead.... There will be other workarounds for this - including the symbol must exist in some debug library somewhere...

Hope this works for you!

StuartLodge at 2007-9-9 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...
# 7

Thanks StuartLodge, but it doesn't work for me yet. And I must turn on the option "Treat wchar_t as type".

Hi shian, have you solved this problem? Can you post any updates? I've been suffering this issue for several days...

And how to set calling convention in VS2005? If VS2003, we can set __cdecl or __stdcall in C/C++ | Advanced | Calling Convention, but it seems that VS2005 doesn't have this option. And VS2005 will not accept /Gz compiler option if we add it manually via command line.

QimingLu at 2007-9-9 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...
# 8
I faced similar problem of unresolved symbols while I was switching from VS 2003 to VS 2005 project. Your post saved me for further frustation.

Thanks a lot.

NelsonPinto at 2007-9-9 > top of Msdn Tech,Smart Device Development,Smart Devices Native C++ Development...