[omniORB] build problems
Richard Hardgrave
hardgrav@ttd.teradyne.com
Tue, 12 Jun 2001 19:00:49 -0500 (CDT)
Hi folks,
I'm trying to convert an Orbix IDL to omniORB. Is this something I
should even attempt in an incremental fashion, or should I just redesign
from scratch? It appears that at least one of the interface methods (e.g.,
request_es) has an argument mismatch between the base class definition that
it inherits and its derived class definition. There _are_ definitions for
all the base class methods in the derived class. I'm just hoping that I just
don't understand something about the build environment. Or, is this one of
those parts of the architecture that do not translate from BOA to POA?
(omniORB 3.0.3; Solaris 2.5.1; SUNWspro 4.2 compiler)
make output:
"TosES_i.cc", line 2636: Error: Cannot create a variable for abstract class ES_Mgr_i.
(code shown below)
"TosES_i.cc", line 2636: Error:
TosES::_impl_ES_Mgr::request_es(const char*,
_CORBA_ObjRef_OUT_arg<TosES::_objref_E_S, TosES::E_S_Helper>)
has not been overridden.
"TosES_i.cc", line 2636: Error:
TosES::_impl_ES_Mgr::get_source_group(const char*,
_CORBA_ConstrType_Variable_OUT_arg<TosES::Source_Group,
_CORBA_ConstrType_Variable_Var<TosES::Source_Group>>)
has not been overridden.
"TosES_i.cc", line 2636: Error: TosES::_impl_ES_Mgr::get_source_groups(TosES::Source_Groups_out)
has not been overridden.
4 Error(s) detected.
make: *** [TosES_i.o] Error 4
Here's part of the servant class as it was generated by 'omiidl -bcxx -WbBOA -Wbexample TosES.idl'.
(TosES.hh)
class _impl_ES_Mgr :
public virtual omniServant
{
public:
virtual ~_impl_ES_Mgr();
...
...
virtual void get_source_groups(Source_Groups_out sourceGroups) = 0;
virtual void get_source_group(const char* sourceGroupName,
Source_Group_out sourceGroup) = 0;
...
virtual void request_es(const char* sourceGroupName,
_CORBA_ObjRef_OUT_arg< TosES::_objref_E_S, E_S_Helper > es) = 0;
...
...
};
struct Source_Group {
typedef _CORBA_ConstrType_Variable_Var<Source_Group> _var_type;
CORBA::String_member sourceGroupName;
CORBA::String_member sourceGroupDirectory;
Source_Defs sourceDefs;
size_t _NP_alignedSize(size_t initialoffset) const;
void operator>>= (NetBufferedStream &) const;
void operator<<= (NetBufferedStream &);
void operator>>= (MemBufferedStream &) const;
void operator<<= (MemBufferedStream &);
};
typedef Source_Group::_var_type Source_Group_var;
typedef _CORBA_ConstrType_Variable_OUT_arg< Source_Group,Source_Group_var > Source_Group_out;
Here's what the -Wbexample flag produced:
(TosES_i.cc)
//
// Example class implementing IDL interface TosES::ES_Mgr
//
class ES_Mgr_i: public POA_TosES::ES_Mgr,
public PortableServer::RefCountServantBase
{
private:
...
... not pertinent code
...
public:
// methods corresponding to defined IDL attributes and operations
...
...
...
virtual void get_source_groups (
TosES::Source_Groups*& sourceGroups);
virtual void get_source_group (
const char * sourceGroupName,
TosES::Source_Group*& sourceGroup);
...
...
virtual void request_es (
const char * sourceGroupName,
TosES::E_S_ptr& es);
...
...
...
};
int main(int argc, char** argv)
{
try {
// Initialise the ORB.
CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "omniORB3");
// Obtain a reference to the root POA.
CORBA::Object_var obj = orb->resolve_initial_references("RootPOA");
PortableServer::POA_var poa = PortableServer::POA::_narrow(obj);
// We allocate the objects on the heap. Since these are reference
// counted objects, they will be deleted by the POA when they are no
// longer needed.
//**************************************
And, this is the line it's choking on:
//**************************************
(2636) ES_Mgr_i* myES_Mgr_i = new ES_Mgr_i();
// Activate the objects. This tells the POA that the objects are
// ready to accept requests.
// PortableServer::ObjectId_var myTosES_E_S_iid = poa->activate_object(myTosES_E_S_i);
PortableServer::ObjectId_var myES_Mgr_iid = poa->activate_object(myES_Mgr_i);
// Obtain a reference to each object and output the stringified
// IOR to stdout
BTW, I can compile and run the examples without problems.
Regards,
Richard