[omniORB] Skeletons failing to compile

Frode Haugen fh@dynamica.no
Mon, 3 Aug 1998 11:31:44 +0200


hello omniORBers:


The following construct has been handed to us as a part of a specification
for a server we are to implement. Clients (java) and a demo server has
apparently been succesfully implemented in omniBroker:

 ------------------- a.idl ---------------
#ifndef A_idl   // Mandatory to avoid recursive includes
#define A_idl 

interface A;    // Forward declaraton to be used in b.idl

#include "b.idl"

interface A {
  B x(in long index);
};

#endif
 ------------------- b.idl ---------------
#ifndef B_idl    // Mandatory to avoid recursive includes
#define B_idl 

interface B;    // Forward declaraton to be used in a.idl
#include "a.idl"

interface B {
  A y(in long index);
};

#endif


omniidl2 swallows this without complaints, but when compiling
(egcs-1.0.1/rh-5.0) I get errors:

 g++ -c -pthread -Wall -Wno-unused  -D__OMNIORB2__ -I/usr/local/omniORB/include -I. -D__x86__   -D__linux__  -D__OSVERSION__=2  -D_REENTRANT -g  aSK.cc
In file included from a.hh:6,
                 from aSK.cc:1:
b.hh:57: `A_ptr' declared as a `virtual' field
b.hh:57: parse error before `('
b.hh:117: `A_ptr' declared as a `virtual' field
b.hh:117: parse error before `('
b.hh:137: `A_ptr' declared as a `virtual' field
b.hh:137: parse error before `('
b.hh:156: syntax error before `('
b.hh:165: semicolon missing after declaration of `_nil_B'
b.hh:165: parse error at null character



Presumably this is not excellent idl code, but is it _illegal_ ?

-- 
Frode Haugen                                        e-mail : fh@dynamica.no
===========================================================================
Dynamica AS,   Modelling - Control - Optimization   http://www.dynamica.no
Pirterminalen, N-7010 Trondheim                     Phone:   (+47) 73929160
Norway                                              Fax:     (+47) 73929165
===========================================================================