Solved

Having A Problem With SDK?

Posted on 2000-03-07
4
2,599 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

630 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