Solved

Having A Problem With SDK?

Posted on 2000-03-07
4
2,586 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
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 viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

713 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