?
Solved

Having Problems in SDK Platform

Posted on 2000-02-23
6
Medium Priority
?
2,609 Views
Last Modified: 2013-12-14
Hi, I’m trying to build an video player using the Microsoft’s SDK Platform Direct Show and using the streams.h header file provide in the MSDN library. Anyhow, I have some errors popup when I compiled the program. As for your info, the errors all occurred in the header files that included in the streams.h header file. Hope that you can help me to solve the problems. Thank you very much.


streams.h(7) : fatal error C1021: invalid preprocessor command 'ifdef_MSC_VER'
This error occurred when I first compiled the programs but when I hide it using // or ‘ifdef _MSC_VER’, the below errors occcured.

\reftime.h(49) : error C2226: syntax error : unexpected type 'LONGLONG'
\reftime.h(52) : error C2143: syntax error : missing ';' before '{'
\reftime.h(52) : error C2447: missing function header (old-style formal list?)
\reftime.h(69) : error C2017: illegal escape sequence
\wxdebug.h(179) : error C2065: 'nCount' : undeclared identifier
\wxdebug.h(179) : error C2065: 'lpHandles' : undeclared identifier
\wxdebug.h(179) : error C2065: 'bWaitAll' : undeclared identifier
\wxdebug.h(272) : error C2501: 'WaitForMultipleObjects' : missing storage-class or type specifiers
\wxdebug.h(272) : error C2373: 'WaitForMultipleObjects' : redefinition; different type modifiers
        \winbase.h(2245) : see declaration of 'WaitForMultipleObjects'
\wxdebug.h(272) : error C2078: too many initializers
\wxdebug.h(272) : error C2143: syntax error : missing ';' before '<class-head>'
\wxdebug.h(322) : error C2629: unexpected 'class CDisp ('
\wxdebug.h(322) : error C2238: unexpected token(s) preceding ';'
\combase.h(294) : error C2017: illegal escape sequence
\combase.h(295) : error C2065: 'GetOwner' : undeclared identifier
\combase.h(295) : error C2227: left of '->QueryInterface' must point to class/struct/union
\combase.h(295) : error C2017: illegal escape sequence
\combase.h(296) : error C2017: illegal escape sequence
\combase.h(297) : error C2017: illegal escape sequence
\combase.h(298) : error C2227: left of '->AddRef' must point to class/struct/union
\combase.h(298) : error C2017: illegal escape sequence
\combase.h(299) : error C2017: illegal escape sequence
\combase.h(300) : error C2017: illegal escape sequence
\combase.h(301) : error C2227: left of '->Release' must point to class/struct/union
\combase.h(301) : error C2017: illegal escape sequence

...still got more...
THANK YOU.
0
Comment
Question by:jaskin
  • 3
  • 2
6 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 2552259
What is the actual contents of line 7 in streams.h?  The error 'ifdef_MSC_VER' is obviously bogus as if should be:

#ifdef _MSC_VER

and not:

ifdef_MSC_VER

Did you copy it incorrectly?
0
 
LVL 10

Accepted Solution

by:
RONSLOW earned 400 total points
ID: 2552605
Below is the "streams.h" is from latest SDK I have (Oct99)

Note that there is no #ifdef_MSC_VER as your error message implies.

It sounds like you have edited the file and deleted the spec between the #ifdef and the _MSC_VER.

Reinstall the platform SDK incase there is anything else that has been stuffed.  Also make sure you have the lastest version.

Failing that, fix up the copy of streams.h you have so the #ifdef is correct (maybe copy from this message)

//==========================================================================;
//
//  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
//  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
//  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
//  PURPOSE.
//
//  Copyright (c) 1992 - 1998  Microsoft Corporation.  All Rights Reserved.
//
//--------------------------------------------------------------------------;

// Streams architecture overall header file, January 1995

#ifndef __STREAMS__
#define __STREAMS__

#ifdef      _MSC_VER
// disable some level-4 warnings, use #pragma warning(enable:###) to re-enable
#pragma warning(disable:4100) // warning C4100: unreferenced formal parameter
#pragma warning(disable:4201) // warning C4201: nonstandard extension used : nameless struct/union
#pragma warning(disable:4511) // warning C4511: copy constructor could not be generated
#pragma warning(disable:4512) // warning C4512: assignment operator could not be generated
#pragma warning(disable:4514) // warning C4514: "unreferenced inline function has been removed"

#if _MSC_VER>=1100
#define AM_NOVTABLE __declspec(novtable)
#else
#define AM_NOVTABLE
#endif
#endif      // MSC_VER


#include <windows.h>
#include <windowsx.h>
#include <olectl.h>
#include <ddraw.h>
#include <mmsystem.h>

#ifndef NUMELMS
   #define NUMELMS(aa) (sizeof(aa)/sizeof((aa)[0]))
#endif

#include <strmif.h>     // Generated IDL header file for streams interfaces

#include <reftime.h>    // Helper class for REFERENCE_TIME management
#include <wxdebug.h>    // Debug support for logging and ASSERTs
#include <amvideo.h>    // ActiveMovie video interfaces and definitions
//include amaudio.h explicitly if you need it.  it requires the DX SDK.
//#include <amaudio.h>    // ActiveMovie audio interfaces and definitions
#include <wxutil.h>     // General helper classes for threads etc
#include <combase.h>    // Base COM classes to support IUnknown
#include <dllsetup.h>   // Filter registration support functions
#include <measure.h>    // Performance measurement
#include <comlite.h>    // Light weight com function prototypes

#include <cache.h>      // Simple cache container class
#include <wxlist.h>     // Non MFC generic list class
#include <msgthrd.h>      // CMsgThread
#include <mtype.h>      // Helper class for managing media types
#include <fourcc.h>     // conversions between FOURCCs and GUIDs
#include <control.h>    // generated from control.odl
#include <ctlutil.h>    // control interface utility classes
#include <evcode.h>     // event code definitions
#include <amfilter.h>   // Main streams architecture class hierachy
#include <transfrm.h>   // Generic transform filter
#include <transip.h>    // Generic transform-in-place filter
#include <uuids.h>      // declaration of type GUIDs and well-known clsids
#include <source.h>      // Generic source filter
#include <outputq.h>    // Output pin queueing
#include <errors.h>     // HRESULT status and error definitions
#include <renbase.h>    // Base class for writing ActiveX renderers
#include <winutil.h>    // Helps with filters that manage windows
#include <winctrl.h>    // Implements the IVideoWindow interface
#include <videoctl.h>   // Specifically video related classes
#include <refclock.h>      // Base clock class
#include <sysclock.h>      // System clock
#include <pstream.h>    // IPersistStream helper class
#include <vtrans.h>     // Video Transform Filter base class
#include <amextra.h>
#include <cprop.h>      // Base property page class
#include <strmctl.h>    // IAMStreamControl support
#include <edevdefs.h>   // External device control interface defines
#include <audevcod.h>   // audio filter device error event codes

#else
    #ifdef DEBUG
    #pragma message("STREAMS.H included TWICE")
    #endif
#endif // __STREAMS__
0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 2552633
BTW: be VERY careful mixing the latest platform SDK with MFC when the #define's are set for Windows 2000 features.

The MFC CFileDialog will stuff up because of changes to the definitions of some structs.

Bascially, the current VC6 SP3 MFC will NOT work with the platform SDK when you
#define _WIN32_WINNT 0x0500
0
Independent Software Vendors: 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!

 

Author Comment

by:jaskin
ID: 2588422
Thanks...
0
 

Author Comment

by:jaskin
ID: 2592444
Hmm..I still have the problems of building up the program. And really hope that you can help me...Below are the errors:

refclock.h(84) : error C2629: unexpected 'class CBaseReferenceClock ('
refclock.h(84) : error C2238: unexpected token(s) preceding ';'
refclock.h(140) : error C2143: syntax error : missing ';' before '*'
refclock.h(140) : error C2501: 'CAMSchedule' : missing storage-class or type specifiers
refclock.h(140) : error C2501: 'GetSchedule' : missing storage-class or type specifiers
refclock.h(140) : warning C4183: 'GetSchedule': member function definition looks like a ctor, but name does not match enclosing class
refclock.h(169) : error C2143: syntax error : missing ';' before '*'
refclock.h(169) : error C2501: 'CAMSchedule' : missing storage-class or type specifiers
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
resource.h(11) : warning C4005: 'WM_VSCROLL' : macro redefinition
winuser.h(1747) : see previous definition of 'WM_VSCROLL'
resource.h(12) : warning C4005: 'WM_HSCROLL' : macro redefinition
winuser.h(1746) : see previous definition of 'WM_HSCROLL'




but when I do the // for //refclock.h and //sysclock.h....i have the following errors.....

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
Error executing link.exe.




hope to hear from you....
thanks.
0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 2593578
Check that you have put a semi-colon (;) at the end of each of your class declarations (after the closing curly-brace).

If you leave that semi-colon out you get all sorts of funny messages on the NEXT class (or whatever) that follows.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
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.

850 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