Reputation: 157
So I'm trying to compile the PushSourceDesktop sample with my other project so I can use the 'new' keyword to make an object directly without loading an external dll. I've included all the files in my project and added my precompiled header to the .cpp files. I'm down to these errors that I can't really figure out even with the help of google and various other searches. Hoping someone here might be able to shed some light, thanks in advance!
Error 4 error C2065: 'm_pString' : undeclared identifier c:\program files\microsoft sdks\windows\v7.1\samples\multimedia\directshow\baseclasses\wxdebug.h 292 1 record3
Error 5 error C2065: 'm_pString' : undeclared identifier c:\program files\microsoft sdks\windows\v7.1\samples\multimedia\directshow\baseclasses\wxdebug.h 316 1 record3
Error 1 error C2146: syntax error : missing ';' before identifier 'm_pString' c:\program files\microsoft sdks\windows\v7.1\samples\multimedia\directshow\baseclasses\wxdebug.h 295 1 record3
Error 2 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft sdks\windows\v7.1\samples\multimedia\directshow\baseclasses\wxdebug.h 295 1 record3
Error 3 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft sdks\windows\v7.1\samples\multimedia\directshow\baseclasses\wxdebug.h 295 1 record3
8 IntelliSense: identifier "PTCHAR" is undefined c:\program files\microsoft sdks\windows\v7.1\samples\multimedia\directshow\baseclasses\wxdebug.h 295 5
Upvotes: 1
Views: 2146
Reputation: 69662
The problem is related to order of inclusion of SDK headers. You perhaps need to add #include <tchar.h>
somewhere on top of the code since PTCHAR
is that compiler is unable to find.
Because DirectShow Base Classes is quite specific class base, I would suggest that you don't mix it with other C++ code you are having (such as ATL, WTL or MFC). This is possible , but this is likely to keep causing issues similar to the one in your question.
Instead, you can keep your filter in separate DLL, you can instantiate it via CoCreateInstance
or privately through DllGetClassObject
/CreateInstance
, and communicate to it over private interface.
Upvotes: 1