Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2617
  • Last Modified:

Having A Problem With SDK?

I have some problems concerning about the SDK and streams.h file. So, i really hope that you can give me some advices on figuring out the possible solutions for it.
Below are the errors occured when i use the streams.h file while working on SDK to build a Video Player.

:::
Clientcomm.cpp
c:\program files\microsoft visual studio\vc98\include\refclock.h(84) : error C2629: unexpected 'class CBaseReferenceClock ('
c:\program files\microsoft visual studio\vc98\include\refclock.h(84) : error C2238: unexpected token(s) preceding ';'
c:\program files\microsoft visual studio\vc98\include\refclock.h(140) : error C2143: syntax error : missing ';' before '*'
c:\program files\microsoft visual studio\vc98\include\refclock.h(140) : error C2501: 'CAMSchedule' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\refclock.h(140) : error C2501: 'GetSchedule' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\refclock.h(140) : warning C4183: 'GetSchedule': member function definition looks like a ctor, but name does not match enclosing class
c:\program files\microsoft visual studio\vc98\include\refclock.h(169) : error C2143: syntax error : missing ';' before '*'
c:\program files\microsoft visual studio\vc98\include\refclock.h(169) : error C2501: 'CAMSchedule' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\refclock.h(169) : error C2501: 'm_pSchedule' : missing storage-class or type specifiers
stdwin.h(16) : warning C4005: 'ASSERT' : macro redefinition
        c:\program files\microsoft visual studio\vc98\include\wxdebug.h(197) : see previous definition of 'ASSERT'
clientcomm.h(10) : warning C4042: 'lFileOffset' : has bad storage class
clientcomm.h(10) : warning C4042: 'lFileOffset' : has bad storage class
clientcomm.cpp(123) : warning C4042: 'lFileOffset' : has bad storage class

Harmony.cpp
c:\program files\microsoft visual studio\vc98\include\refclock.h(84) : error C2629: unexpected 'class CBaseReferenceClock ('
c:\program files\microsoft visual studio\vc98\include\refclock.h(84) : error C2238: unexpected token(s) preceding ';'
c:\program files\microsoft visual studio\vc98\include\refclock.h(140) : error C2143: syntax error : missing ';' before '*'
c:\program files\microsoft visual studio\vc98\include\refclock.h(140) : error C2501: 'CAMSchedule' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\refclock.h(140) : error C2501: 'GetSchedule' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\refclock.h(140) : warning C4183: 'GetSchedule': member function definition looks like a ctor, but name does not match enclosing class
c:\program files\microsoft visual studio\vc98\include\refclock.h(169) : error C2143: syntax error : missing ';' before '*'
c:\program files\microsoft visual studio\vc98\include\refclock.h(169) : error C2501: 'CAMSchedule' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\refclock.h(169) : error C2501: 'm_pSchedule' : missing storage-class or type specifiers
stdwin.h(16) : warning C4005: 'ASSERT' : macro redefinition
        c:\program files\microsoft visual studio\vc98\include\wxdebug.h(197) : see previous definition of 'ASSERT'
clientcomm.h(10) : warning C4042: 'lFileOffset' : has bad storage class
clientcomm.h(10) : warning C4042: 'lFileOffset' : has bad storage class



But, after I close the //#include <refclock.h>, I have the following errors..


:::
Clientcomm.cpp
c:\program files\microsoft visual studio\vc98\include\sysclock.h(23) : error C2504: 'CBaseReferenceClock' : base class undefined
stdwin.h(16) : warning C4005: 'ASSERT' : macro redefinition
        c:\program files\microsoft visual studio\vc98\include\wxdebug.h(197) : see previous definition of 'ASSERT'
clientcomm.h(10) : warning C4042: 'lFileOffset' : has bad storage class
clientcomm.h(10) : warning C4042: 'lFileOffset' : has bad storage class
clientcomm.cpp(123) : warning C4042: 'lFileOffset' : has bad storage class
Harmony.cpp
c:\program files\microsoft visual studio\vc98\include\sysclock.h(23) : error C2504: 'CBaseReferenceClock' : base class undefined
stdwin.h(16) : warning C4005: 'ASSERT' : macro redefinition
        c:\program files\microsoft visual studio\vc98\include\wxdebug.h(197) : see previous definition of 'ASSERT'
clientcomm.h(10) : warning C4042: 'lFileOffset' : has bad storage class
clientcomm.h(10) : warning C4042: 'lFileOffset' : has bad storage class

Finally, after i solve others errors while closing both the //#include <refclock.h> and //#include <sysclock.h> in the streams.h, i got the following errors while linking......
:::::

Linking...
Harmony.obj : error LNK2001: unresolved external symbol "public: __thiscall CMediaType::~CMediaType(void)" (??1CMediaType@@QAE@XZ)
Harmony.obj : error LNK2001: unresolved external symbol "public: __thiscall CMediaType::CMediaType(void)" (??0CMediaType@@QAE@XZ)
Harmony.obj : error LNK2001: unresolved external symbol __imp__timeGetTime@0
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::QueryVendorInfo(unsigned short * *)" (?QueryVendorInfo@CBaseFilter@@UAGJPAPAG@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::JoinFilterGraph(struct IFilterGraph *,unsigned short const *)" (?JoinFilterGraph@CBaseFilter@@UAGJPAUIFilterGraph@@PBG@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::QueryFilterInfo(struct _FilterInfo *)" (?QueryFilterInfo@CBaseFilter@@UAGJPAU_FilterInfo@@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::FindPin(unsigned short const *,struct IPin * *)" (?FindPin@CBaseFilter@@UAGJPBGPAPAUIPin@@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::EnumPins(struct IEnumPins * *)" (?EnumPins@CBaseFilter@@UAGJPAPAUIEnumPins@@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::GetSyncSource(struct IReferenceClock * *)" (?GetSyncSource@CBaseFilter@@UAGJPAPAUIReferenceClock@@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::SetSyncSource(struct IReferenceClock *)" (?SetSyncSource@CBaseFilter@@UAGJPAUIReferenceClock@@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::GetState(unsigned long,enum _FilterState *)" (?GetState@CBaseFilter@@UAGJKPAW4_FilterState@@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::Run(__int64)" (?Run@CBaseFilter@@UAGJ_J@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::Pause(void)" (?Pause@CBaseFilter@@UAGJXZ)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::Stop(void)" (?Stop@CBaseFilter@@UAGJXZ)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::GetClassID(struct _GUID *)" (?GetClassID@CBaseFilter@@UAGJPAU_GUID@@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual class CBasePin * __thiscall CAsyncReader::GetPin(int)" (?GetPin@CAsyncReader@@UAEPAVCBasePin@@H@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CAsyncReader::GetPinCount(void)" (?GetPinCount@CAsyncReader@@UAEHXZ)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CBaseFilter::GetPinVersion(void)" (?GetPinVersion@CBaseFilter@@UAEJXZ)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __thiscall CBaseFilter::StreamTime(class CRefTime &)" (?StreamTime@CBaseFilter@@UAEJAAVCRefTime@@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual unsigned long __stdcall CUnknown::NonDelegatingRelease(void)" (?NonDelegatingRelease@CUnknown@@UAGKXZ)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual unsigned long __stdcall CUnknown::NonDelegatingAddRef(void)" (?NonDelegatingAddRef@CUnknown@@UAGKXZ)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual long __stdcall CBaseFilter::NonDelegatingQueryInterface(struct _GUID const &,void * *)" (?NonDelegatingQueryInterface@CBaseFilter@@UAGJABU_GUID@@PAPAX@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CAsyncReader::~CAsyncReader(void)" (??1CAsyncReader@@UAE@XZ)
Harmony.obj : error LNK2001: unresolved external symbol "public: class CMediaType & __thiscall CMediaType::operator=(class CMediaType const &)" (??4CMediaType@@QAEAAV0@ABV0@@Z)
Harmony.obj : error LNK2001: unresolved external symbol "public: __thiscall CAsyncReader::CAsyncReader(char *,struct IUnknown *,class CAsyncStream *,long *)" (??0CAsyncReader@@QAE@PADPAUIUnknown@@PAVCAsyncStream@@PAJ@Z)
Debug/Harm1.exe : fatal error LNK1120: 25 unresolved externals

hmmmm...i think that the .lib files have problem because i didn't know which one have to be added.

I really hope that you can give me some ideas and solutions in order for me to build up my programs...

Really thanks you.....
Best regards
0
jaskin
Asked:
jaskin
  • 2
1 Solution
 
AlexVirochovskyCommented:
Jaskin, see
http://msdn.microsoft.com/library/techart/msdn_streams3.htm
with source code of using streams.h
Alex
0
 
RONSLOWCommented:
Ensure you have a ';' at the end of all your class declarations.  If you leave it out, you get messages like the ones you show for subsequent classes.

Missing semicolon error often confuse the compiler and so the error messages they generate very often confuse the programmer as well.
0
 
alexoCommented:
I think you're missing some livraries that you should link to.
Try adding: strmbase.lib

Reference:

http://www.microsoft.com/DirectX/dxm/help/ds/appdev/Build_Filter_App_Visual_C++_5x.htm#Set_Project_Settings_for_Both_Release_and_Debug_Builds
0
 
alexoCommented:
s/livraries/libraries
Gotta get some sleep...
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now