[omniORB] IDL modules

Hamilton Temple hamilton.temple at gmail.com
Thu Aug 14 16:28:37 BST 2008


Hello there,

I have been working with the following idl definition:

interface Add{
   double add(in string a, in string b, in string c);
};

In the server I use the following instruction to activate the object id:

AddImpl * addImpl=new AddImpl();
PortableServer::ObjectId_var myObjID = myPOA->activate_object(addImpl);

I modified the idl as follows:

module Operations{
   interface Add{
       double add(in string a, in string b, in string c);
   };
};

I defined the corresponding namespace Operations in the implementation, and
added the line "using namespace Operations;" at the beginning of the server
code.

Now compilation fails with the following errors:

server.cpp: In function 'int main(int, char**)':
server.cpp:64: error: no matching function for call to
'PortableServer::POA::activate_object(Operations::AddImpl*&)'
/usr/include/omniORB4/poa.h:552: note: candidates are: virtual
PortableServer::ObjectId*
PortableServer::POA::activate_object(PortableServer::ServantBase*)
server.cpp:67: error: no matching function for call to
'PortableServer::POA::servant_to_reference(Operations::AddImpl*&)'
/usr/include/omniORB4/poa.h:566: note: candidates are: virtual
CORBA::Object*
PortableServer::POA::servant_to_reference(PortableServer::ServantBase*)

Any hints would be much appreciated. Thank you,

Hamilton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20080814/ec0a6044/attachment.htm


More information about the omniORB-list mailing list