Solved

Having A Problem With SDK?

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now