[omniORB] pure virtual function was not defined

Gary Mc Manus garimac@indigo.ie
Wed, 9 Sep 1998 17:47:53 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_004B_01BDDC19.F825C580
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi

Could someone please help me. I have not yet subscribed to the list but =
have a problem.
It may be a simple solution but I cannot find it. If anyone has any =
ideas could they please mail me direct until I have subscribed
I am using OmniORB2.5.0 with VC++5 on NT4.

I have compiled the my idl interface :

interface CDR{
    ...
     short goout(in short recordPos);
    ...
 };

in my generated .hh file I have

class CDR : public virtual omniObject, public virtual CORBA::Object {
public:
...=20
...
virtual CORBA::Short  goout ( CORBA::Short  recordPos ) =3D 0;       =
=3D> pure virtual function=20
...
...
};


class _sk_CDR :  public virtual CDR {
...
...=20
virtual CORBA::Short  goout ( CORBA::Short  recordPos ) =3D 0;        =
=3D> pure virtual function
...
...
};




class _proxy_CDR :  public virtual CDR {
...
...
virtual CORBA::Short  goout ( CORBA::Short  recordPos );
...
...
};


In my cdrSK.cpp file I have

CORBA::Short  _proxy_CDR::goout ( CORBA::Short  recordPos )
{
...
...
}



In my _i.h file I have the folowing class

class CDR_i : public virtual _sk_CDR{
...
...
virtual CORBA::Short goout (const short recordCount);
...
...
};

with the definition in _i.cpp

CORBA::Short CDR_i::goout (const short recordCount)=20
{
...
...
...
}


When I compile the project I get the following error based on the =
warning below it

error
error C2259: 'CDR_i' : cannot instantiate abstract class due to =
following members:
warning
'short _sk_CDR::goout(short)' : pure virtual function was not defined



I would greatly appreciate a helping hand in the right direction.
Gary Mc Manus


------=_NextPart_000_004B_01BDDC19.F825C580
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.71.1712.3"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>
<DIV><FONT size=3D2><STRONG><EM></EM></STRONG></FONT><FONT =
color=3D#000000=20
size=3D2><FONT size=3D2><FONT face=3D"Times New =
Roman">Hi</FONT></FONT></FONT><FONT=20
face=3D"Times New Roman"><FONT size=3D2></FONT></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000><FONT size=3D2><FONT=20
face=3D"Times New Roman"></FONT></FONT></FONT><FONT face=3D"Times New =
Roman"><FONT=20
size=3D2></FONT></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000><FONT size=3D2><FONT face=3D"Times New =
Roman">Could someone=20
please help me. I have not yet subscribed to the list but have a=20
problem.</FONT></FONT></FONT><FONT face=3D"Times New Roman"><FONT=20
size=3D2></FONT></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000><FONT size=3D2><FONT=20
face=3D"Times New Roman"></FONT></FONT></FONT><FONT face=3D"Times New =
Roman"><FONT=20
size=3D2>It may be a simple solution but I cannot find it. If anyone has =
any ideas=20
could they please mail me direct until I have =
subscribed</FONT></FONT></DIV>
<DIV><FONT color=3D#000000><FONT size=3D2><FONT=20
face=3D"Times New Roman"></FONT></FONT></FONT><FONT face=3D"Times New =
Roman"><FONT=20
size=3D2>I am using OmniORB2.5.0 with VC++5 on NT4.</FONT></FONT></DIV>
<DIV><FONT face=3D"Times New Roman" size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Times New Roman" size=3D2>I have compiled the my idl =
interface=20
:</FONT></DIV>
<DIV><FONT face=3D"Times New Roman"=20
size=3D2><STRONG><EM></EM></STRONG></FONT>&nbsp;</DIV>
<DIV><EM><STRONG><FONT face=3D"Times New Roman" size=3D2>interface=20
CDR{</EM></STRONG></FONT></DIV>
<DIV><EM><STRONG><FONT face=3D"Times New Roman" =
size=3D2>&nbsp;&nbsp;&nbsp;=20
...<BR>&nbsp;&nbsp;&nbsp;&nbsp; short goout(in short=20
recordPos);</EM></STRONG></FONT>&nbsp;</DIV>
<DIV><EM><STRONG><FONT face=3D"Times New Roman" =
size=3D2>&nbsp;&nbsp;&nbsp; ...<BR>=20
};</EM><BR></STRONG></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000><FONT size=3D2><FONT face=3D"Times New =
Roman">in my=20
generated .hh file I have</FONT></FONT></FONT><FONT face=3D"Times New =
Roman"><FONT=20
size=3D2></FONT></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000><FONT size=3D2><FONT=20
face=3D"Times New Roman"></FONT></FONT></FONT><FONT face=3D"Times New =
Roman"><FONT=20
size=3D2></FONT></FONT>&nbsp;</DIV>
<DIV>
<DIV><EM><STRONG><FONT face=3D"Times New Roman" size=3D2>class CDR : =
public virtual=20
omniObject, public virtual CORBA::Object=20
{<BR>public:<BR>...</EM>&nbsp;</STRONG></FONT>&nbsp;</DIV>
<DIV><EM><STRONG><FONT face=3D"Times New Roman"=20
size=3D2>...</EM></STRONG></FONT></DIV>
<DIV><FONT color=3D#000000><EM><STRONG><FONT size=3D2><FONT=20
face=3D"Times New Roman">virtual CORBA::Short&nbsp; goout ( =
CORBA::Short&nbsp;=20
recordPos ) =3D 0;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
</STRONG></EM>=3D&gt; pure=20
virtual function<EM></EM></FONT></FONT></FONT><FONT face=3D"Times New =
Roman"><FONT=20
size=3D2>&nbsp;</FONT></FONT></DIV>
<DIV><EM><STRONG><FONT face=3D"Times New Roman"=20
size=3D2>...</EM></STRONG></FONT></DIV>
<DIV><EM><STRONG><FONT face=3D"Times New Roman"=20
size=3D2>...</EM></STRONG></FONT></DIV>
<DIV><EM><STRONG><FONT face=3D"Times New Roman"=20
size=3D2>};</EM></STRONG></FONT></DIV>
<DIV><STRONG><FONT face=3D"Times New Roman" =
size=3D2></STRONG></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Times New Roman" size=3D2></FONT>&nbsp;</DIV></DIV>
<DIV>
<DIV><FONT color=3D#000000><EM><STRONG><FONT size=3D2><FONT=20
face=3D"Times New Roman">class _sk_CDR :&nbsp; public virtual CDR=20
{</FONT></FONT></FONT><FONT face=3D"Times New Roman"><FONT=20
size=3D2></EM></STRONG></FONT></FONT></DIV>
<DIV><FONT color=3D#000000><EM><STRONG><FONT size=3D2><FONT=20
face=3D"Times New Roman"></FONT></FONT></FONT><FONT face=3D"Times New =
Roman"><FONT=20
size=3D2>...</EM></STRONG></FONT></FONT></DIV>
<DIV><EM><STRONG><FONT face=3D"Times New Roman"=20
size=3D2>...</EM>&nbsp;</STRONG></FONT></DIV>
<DIV><FONT color=3D#000000><EM><STRONG><FONT size=3D2><FONT=20
face=3D"Times New Roman">virtual CORBA::Short&nbsp; goout ( =
CORBA::Short&nbsp;=20
recordPos ) =3D 0;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
</STRONG></EM>=3D&gt;=20
pure virtual function</FONT></FONT></FONT><FONT face=3D"Times New =
Roman"><FONT=20
size=3D2></FONT></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000><EM><STRONG><FONT size=3D2><FONT=20
face=3D"Times New Roman">...</FONT></FONT></FONT><FONT=20
face=3D"Times New Roman"><FONT =
size=3D2></EM></STRONG></FONT></FONT></DIV>
<DIV><FONT color=3D#000000><EM><STRONG><FONT size=3D2><FONT=20
face=3D"Times New Roman"></FONT></FONT></FONT><FONT face=3D"Times New =
Roman"><FONT=20
size=3D2>...</EM></STRONG></FONT></FONT></DIV>
<DIV><EM><STRONG><FONT face=3D"Times New Roman"=20
size=3D2>};</EM></STRONG></FONT></DIV>
<DIV><FONT face=3D"Times New Roman" size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Times New Roman" size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Times New Roman" size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Times New Roman" size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000><STRONG><EM><FONT size=3D2><FONT=20
face=3D"Times New Roman">class _proxy_CDR :&nbsp; public virtual CDR=20
{</FONT></FONT></FONT><FONT face=3D"Times New Roman"><FONT=20
size=3D2></EM></STRONG></FONT></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000><STRONG><EM><FONT size=3D2><FONT=20
face=3D"Times New Roman"></FONT></FONT></FONT><FONT face=3D"Times New =
Roman"><FONT=20
size=3D2>...</EM></STRONG></FONT></FONT></DIV>
<DIV><STRONG><EM><FONT face=3D"Times New Roman"=20
size=3D2>...</EM></STRONG></FONT>&nbsp;</DIV>
<DIV><STRONG><EM><FONT face=3D"Times New Roman" size=3D2><FONT =
color=3D#000000>virtual=20
CORBA::Short&nbsp; goout ( CORBA::Short&nbsp; recordPos=20
);</FONT></EM></STRONG></FONT></DIV>
<DIV><STRONG><EM><FONT face=3D"Times New Roman"=20
size=3D2>...</EM></STRONG></FONT></DIV>
<DIV><STRONG><EM><FONT face=3D"Times New Roman"=20
size=3D2>...</EM></STRONG></FONT>&nbsp;</DIV>
<DIV><STRONG><EM><FONT face=3D"Times New Roman"=20
size=3D2>};</EM></STRONG></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Times New Roman" size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Times New Roman" size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000><FONT size=3D2><FONT face=3D"Times New =
Roman">In my=20
cdrSK.cpp file I hav<FONT =
color=3D#000000>e</FONT></FONT></FONT></FONT><FONT=20
face=3D"Times New Roman"><FONT size=3D2></FONT></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000><FONT color=3D#000000><FONT size=3D2><FONT=20
face=3D"Times New Roman"></FONT></FONT></FONT></FONT><FONT=20
face=3D"Times New Roman"><FONT size=3D2></FONT></FONT>&nbsp;</DIV>
<DIV><STRONG><EM><FONT face=3D"Times New Roman" =
size=3D2>CORBA::Short&nbsp;=20
_proxy_CDR::goout ( CORBA::Short&nbsp; recordPos =
)</EM></STRONG></FONT></DIV>
<DIV><STRONG><EM><FONT face=3D"Times New Roman"=20
size=3D2></EM></STRONG><STRONG><EM>{</EM></STRONG></FONT></DIV>
<DIV><STRONG><EM><FONT face=3D"Times New Roman"=20
size=3D2></EM></STRONG><STRONG><EM>...</EM></STRONG></FONT></DIV>
<DIV><STRONG><EM><FONT face=3D"Times New Roman"=20
size=3D2></EM></STRONG><STRONG><EM>...</EM></STRONG></FONT></DIV>
<DIV><STRONG><EM><FONT face=3D"Times New Roman"=20
size=3D2></EM></STRONG><STRONG><EM>}</EM></STRONG></FONT></DIV>
<DIV><FONT color=3D#000000><FONT color=3D#000000><FONT size=3D2><FONT=20
face=3D"Times New Roman"></FONT></FONT></FONT></FONT><FONT=20
face=3D"Times New Roman"><FONT size=3D2></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Times New Roman" size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Times New Roman" size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000><FONT size=3D2><FONT face=3D"Times New =
Roman">In my _i.h=20
file I have the folowing class</FONT></FONT></FONT><FONT=20
face=3D"Times New Roman"><FONT size=3D2></FONT></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000><FONT size=3D2><FONT=20
face=3D"Times New Roman"></FONT></FONT></FONT><FONT face=3D"Times New =
Roman"><FONT=20
size=3D2></FONT></FONT>&nbsp;</DIV>
<DIV><STRONG><EM><FONT face=3D"Times New Roman" size=3D2>class CDR_i : =
public=20
virtual _sk_CDR{</EM></STRONG></FONT></DIV>
<DIV><STRONG><EM><FONT face=3D"Times New Roman"=20
size=3D2>...</EM></STRONG></FONT>&nbsp;</DIV>
<DIV><STRONG><EM><FONT face=3D"Times New Roman"=20
size=3D2>...</EM></STRONG></FONT>&nbsp;</DIV>
<DIV><STRONG><EM><FONT face=3D"Times New Roman" size=3D2><FONT =
color=3D#000000>virtual=20
CORBA::Short goout (const short =
recordCount);</FONT></EM></STRONG></FONT></DIV>
<DIV><STRONG><EM><FONT face=3D"Times New Roman"=20
size=3D2>...</EM></STRONG></FONT></DIV>
<DIV><STRONG><EM><FONT face=3D"Times New Roman"=20
size=3D2>...</EM></STRONG></FONT>&nbsp;</DIV>
<DIV><STRONG><EM><FONT face=3D"Times New Roman"=20
size=3D2>};</EM></STRONG></FONT>&nbsp;</DIV>
<DIV><STRONG><EM><FONT face=3D"Times New Roman"=20
size=3D2></EM></STRONG></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000><FONT size=3D2><FONT face=3D"Times New =
Roman">with the=20
definition in _i.cpp</FONT></FONT></FONT><FONT face=3D"Times New =
Roman"><FONT=20
size=3D2></FONT></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000><FONT size=3D2><FONT=20
face=3D"Times New Roman"></FONT></FONT></FONT><FONT face=3D"Times New =
Roman"><FONT=20
size=3D2></FONT></FONT>&nbsp;</DIV>
<DIV><STRONG><EM><FONT face=3D"Times New Roman" size=3D2>CORBA::Short =
CDR_i::goout=20
(const short recordCount) <BR>{</EM></STRONG></FONT>&nbsp;</DIV>
<DIV><STRONG><EM><FONT face=3D"Times New Roman"=20
size=3D2>...</EM></STRONG></FONT>&nbsp;</DIV>
<DIV><STRONG><EM><FONT face=3D"Times New Roman"=20
size=3D2>...<BR>...</EM></STRONG></FONT>&nbsp;</DIV>
<DIV><STRONG><EM><FONT face=3D"Times New Roman"=20
size=3D2>}<BR></EM></STRONG></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><STRONG><EM><FONT face=3D"Times New Roman" =
size=3D2></EM></STRONG><FONT=20
color=3D#000000>When I compile the project I get the following error =
based on the=20
warning below it</FONT></FONT></DIV>
<DIV><FONT face=3D"Times New Roman" size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000><FONT size=3D2><FONT=20
face=3D"Times New Roman">error</FONT></FONT></FONT><FONT=20
face=3D"Times New Roman"><FONT size=3D2></FONT></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 face=3D"Times New Roman" size=3D2></FONT>
<DIV>
<DIV><FONT color=3D#000000><STRONG><EM><FONT size=3D2><FONT=20
face=3D"Times New Roman">error C2259: 'CDR_i' : cannot instantiate =
abstract class=20
due to following members:</FONT></FONT></FONT><FONT face=3D"Times New =
Roman"><FONT=20
size=3D2></EM></STRONG></FONT></FONT></DIV></DIV></DIV></DIV>
<DIV><FONT face=3D"Times New Roman" size=3D2><FONT=20
color=3D#000000>warning</FONT></FONT></DIV>
<DIV><FONT face=3D"Times New Roman" size=3D2><STRONG>'short =
_sk_CDR::goout(short)' :=20
pure virtual function was not defined</STRONG></FONT></DIV>
<DIV><FONT face=3D"Times New Roman" =
size=3D2><STRONG></FONT></STRONG>&nbsp;</DIV>
<DIV><FONT face=3D"Times New Roman" size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Times New Roman" size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Times New Roman" size=3D2>I would greatly appreciate =
a helping=20
hand in the right direction.</FONT></DIV>
<DIV><FONT face=3D"Times New Roman" size=3D2>Gary Mc =
Manus</FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV></DIV></BODY></HTML>

------=_NextPart_000_004B_01BDDC19.F825C580--