Solved

Having A Problem With SDK?

Posted on 2000-03-07
4
2,579 Views
Last Modified: 2013-12-14
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
Comment
Question by:jaskin
  • 2
4 Comments
 
LVL 14

Expert Comment

by:AlexVirochovsky
ID: 2592787
Jaskin, see
http://msdn.microsoft.com/library/techart/msdn_streams3.htm
with source code of using streams.h
Alex
0
 
LVL 10

Accepted Solution

by:
RONSLOW earned 50 total points
ID: 2594092
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
 
LVL 11

Expert Comment

by:alexo
ID: 2596697
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
 
LVL 11

Expert Comment

by:alexo
ID: 2596748
s/livraries/libraries
Gotta get some sleep...
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question