[newbie][long]Pure virtual function call :(

N

Noone Nowhere

Hi.

I'm Visual C++ 6 newbie. I'm trying to compile some simple
source from Rick Leinecker's book (Visual C++ Bible). It's
MFC AppWizard exe. I'm usign VC++ 6. The problem is, when I
compiling I get an error like below. I think sources are ok.
Maybe it's my environment problem? Some configuration mistake
(now it's default). However, sources are available:
http://www.haragi.webpark.pl/learnide.zip
If someone would like to help... ;) sorry about so low level
of my question, but I really don't know how to solve the problem.
I've found similar threads on newsgroups, but without any answer.
Google found also http://tinyurl.com/bacyw, and
http://support.microsoft.com/kb/q181265/, but I don't think it's
the exactly my problem way to solve. Maybe I'm wrong, but as I said,
I'm newbie ;). Big thanks for answer.

Compiling...
StdAfx.cpp
c:\program files\microsoft visual studio\vc98\include\ocidl.h(1571) : error
C2259: 'IRpcStubBuffer' : cannot instantiate abstract class due to
following members:
c:\program files\microsoft visual
studio\vc98\include\objidl.h(8062) : see declaration of 'IRpcStubBuffer'
c:\program files\microsoft visual studio\vc98\include\ocidl.h(1571) :
warning C4259: 'long __stdcall IUnknown::QueryInterface(const struct _GUID
&,void ** )' : pure virtual function was not defined
c:\program files\microsoft visual studio\vc98\include\unknwn.h(109)
: see declaration of 'QueryInterface'
c:\program files\microsoft visual studio\vc98\include\ocidl.h(1571) :
warning C4259: 'unsigned long __stdcall IUnknown::AddRef(void)' : pure
virtual function was not defined
c:\program files\microsoft visual studio\vc98\include\unknwn.h(113)
: see declaration of 'AddRef'
c:\program files\microsoft visual studio\vc98\include\ocidl.h(1571) :
warning C4259: 'unsigned long __stdcall IUnknown::Release(void)' : pure
virtual function was not defined
c:\program files\microsoft visual studio\vc98\include\unknwn.h(115)
: see declaration of 'Release'
c:\program files\microsoft visual studio\vc98\include\ocidl.h(1571) :
warning C4259: 'long __stdcall IRpcStubBuffer::Connect(struct IUnknown *)'
: pure virtual function was not defined
c:\program files\microsoft visual
studio\vc98\include\objidl.h(8065) : see declaration of 'Connect'
c:\program files\microsoft visual studio\vc98\include\ocidl.h(1571) :
warning C4259: 'void __stdcall IRpcStubBuffer::Disconnect(void)' : pure
virtual function was not defined
c:\program files\microsoft visual
studio\vc98\include\objidl.h(8068) : see declaration of 'Disconnect'
c:\program files\microsoft visual studio\vc98\include\ocidl.h(1571) :
warning C4259: 'long __stdcall IRpcStubBuffer::Invoke(struct
tagRPCOLEMESSAGE *,struct IRpcChannelBuffer *)' : pure virtual function was
not defined
c:\program files\microsoft visual
studio\vc98\include\objidl.h(8070) : see declaration of 'Invoke'
c:\program files\microsoft visual studio\vc98\include\ocidl.h(1571) :
warning C4259: 'struct IRpcStubBuffer *__stdcall
IRpcStubBuffer::IsIIDSupported(const struct _GUID &)' : pure virtual
function was not defined
c:\program files\microsoft visual
studio\vc98\include\objidl.h(8074) : see declaration of 'IsIIDSupported'
c:\program files\microsoft visual studio\vc98\include\ocidl.h(1571) :
warning C4259: 'unsigned long __stdcall IRpcStubBuffer::CountRefs(void)' :
pure virtual function was not defined
c:\program files\microsoft visual
studio\vc98\include\objidl.h(8077) : see declaration of 'CountRefs'
c:\program files\microsoft visual studio\vc98\include\ocidl.h(1571) :
warning C4259: 'long __stdcall
IRpcStubBuffer::DebugServerQueryInterface(void ** )' : pure virtual
function was not defined
c:\program files\microsoft visual
studio\vc98\include\objidl.h(8079) : see declaration of
'DebugServerQueryInterface'
c:\program files\microsoft visual studio\vc98\include\ocidl.h(1571) :
warning C4259: 'void __stdcall IRpcStubBuffer::DebugServerRelease(void *)'
: pure virtual function was not defined
c:\program files\microsoft visual
studio\vc98\include\objidl.h(8082) : see declaration of
'DebugServerRelease'
Error executing cl.exe.

learnide.exe - 1 error(s), 10 warning(s)
 
G

Guest

Noone Nowhere said:
Hi.

I'm Visual C++ 6 newbie. I'm trying to compile some simple
source from Rick Leinecker's book (Visual C++ Bible). It's
MFC AppWizard exe. I'm usign VC++ 6. The problem is, when I
compiling I get an error like below. I think sources are ok.
Maybe it's my environment problem? Some configuration mistake
(now it's default). However, sources are available:
http://www.haragi.webpark.pl/learnide.zip
If someone would like to help... ;) sorry about so low level
of my question, but I really don't know how to solve the problem.
I've found similar threads on newsgroups, but without any answer.
Google found also http://tinyurl.com/bacyw, and
http://support.microsoft.com/kb/q181265/, but I don't think it's
the exactly my problem way to solve. Maybe I'm wrong, but as I said,
I'm newbie ;). Big thanks for answer.

Compiling...
StdAfx.cpp
c:\program files\microsoft visual studio\vc98\include\ocidl.h(1571) : error
C2259: 'IRpcStubBuffer' : cannot instantiate abstract class due to
following members:
c:\program files\microsoft visual
studio\vc98\include\objidl.h(8062) : see declaration of 'IRpcStubBuffer'
c:\program files\microsoft visual studio\vc98\include\ocidl.h(1571) :
warning C4259: 'long __stdcall IUnknown::QueryInterface(const struct _GUID
&,void ** )' : pure virtual function was not defined
c:\program files\microsoft visual studio\vc98\include\unknwn.h(109)
: see declaration of 'QueryInterface'
c:\program files\microsoft visual studio\vc98\include\ocidl.h(1571) :
warning C4259: 'unsigned long __stdcall IUnknown::AddRef(void)' : pure
virtual function was not defined
c:\program files\microsoft visual studio\vc98\include\unknwn.h(113)
: see declaration of 'AddRef'
c:\program files\microsoft visual studio\vc98\include\ocidl.h(1571) :
warning C4259: 'unsigned long __stdcall IUnknown::Release(void)' : pure
virtual function was not defined
c:\program files\microsoft visual studio\vc98\include\unknwn.h(115)
: see declaration of 'Release'
c:\program files\microsoft visual studio\vc98\include\ocidl.h(1571) :
warning C4259: 'long __stdcall IRpcStubBuffer::Connect(struct IUnknown *)'
: pure virtual function was not defined
c:\program files\microsoft visual
studio\vc98\include\objidl.h(8065) : see declaration of 'Connect'
c:\program files\microsoft visual studio\vc98\include\ocidl.h(1571) :
warning C4259: 'void __stdcall IRpcStubBuffer::Disconnect(void)' : pure
virtual function was not defined
c:\program files\microsoft visual
studio\vc98\include\objidl.h(8068) : see declaration of 'Disconnect'
c:\program files\microsoft visual studio\vc98\include\ocidl.h(1571) :
warning C4259: 'long __stdcall IRpcStubBuffer::Invoke(struct
tagRPCOLEMESSAGE *,struct IRpcChannelBuffer *)' : pure virtual function was
not defined
c:\program files\microsoft visual
studio\vc98\include\objidl.h(8070) : see declaration of 'Invoke'
c:\program files\microsoft visual studio\vc98\include\ocidl.h(1571) :
warning C4259: 'struct IRpcStubBuffer *__stdcall
IRpcStubBuffer::IsIIDSupported(const struct _GUID &)' : pure virtual
function was not defined
c:\program files\microsoft visual
studio\vc98\include\objidl.h(8074) : see declaration of 'IsIIDSupported'
c:\program files\microsoft visual studio\vc98\include\ocidl.h(1571) :
warning C4259: 'unsigned long __stdcall IRpcStubBuffer::CountRefs(void)' :
pure virtual function was not defined
c:\program files\microsoft visual
studio\vc98\include\objidl.h(8077) : see declaration of 'CountRefs'
c:\program files\microsoft visual studio\vc98\include\ocidl.h(1571) :
warning C4259: 'long __stdcall
IRpcStubBuffer::DebugServerQueryInterface(void ** )' : pure virtual
function was not defined
c:\program files\microsoft visual
studio\vc98\include\objidl.h(8079) : see declaration of
'DebugServerQueryInterface'
c:\program files\microsoft visual studio\vc98\include\ocidl.h(1571) :
warning C4259: 'void __stdcall IRpcStubBuffer::DebugServerRelease(void *)'
: pure virtual function was not defined
c:\program files\microsoft visual
studio\vc98\include\objidl.h(8082) : see declaration of
'DebugServerRelease'
Error executing cl.exe.

learnide.exe - 1 error(s), 10 warning(s)
 
G

Guest

That's no low-level question -- as you call it. If you got the project off a
cd from the book -- it should work as-is -- however -- if you created it and
re-entered the code, there could be many conflicts -- try turning of
precompiled headers in your project.
 
N

Noone Nowhere

That's no low-level question -- as you call it. If you got the project off a
cd from the book -- it should work as-is

Unfortunatelly it doesn't work :(
-- however -- if you created it and re-entered the code,

I did so...
there could be many conflicts -- try turning of
precompiled headers in your project.

I tried, but it doesn't work. Still the same errors :(. Any suggestions ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top