IDL compilation



Hello.

I am trying to compile a demonstrating application from the book
Henning, Vinoski: Advanced CORBA Programming with C++
with orbitcpp-1.3.8, ORBit2-2.8.3, gcc-3.3.2.

example.idl:

struct TimeOfDay {
  short hour;   // 0 - 23
  short minute; // 0 - 59
  short second; // 0 - 59
};

interface Time {
  TimeOfDay get_gmt();
};


$ orbit-idl-2 -l cpp example.idl


Some errors has occured during the compilation of the file example-cpp-skels.cc.


Do I something bad? Is there a bug in the orbitcpp?


$ g++ -c example-cpp-skels.cc `pkg-config --cflags ORBit-2.0-cpp`

In file included from example-cpp-stubs.h:11,
                 from example-cpp-skels.h:8,
                 from example-cpp-skels.cc:6:
example-cpp-common.h:13:21: example.h: No such file or directory
In file included from example-cpp-stubs.h:11,
                 from example-cpp-skels.h:8,
                 from example-cpp-skels.cc:6:
example-cpp-common.h:44: error: `TC_TimeOfDay' was not declared in this scope
example-cpp-common.h:78: error: invalid constructor; you probably meant `Time 
   (const Time&)'
example-cpp-common.h:85: error: `TC_Time' was not declared in this scope
example-cpp-common.h: In function `void operator<<=(CORBA::Any&, const 
   TimeOfDay&)':
example-cpp-common.h:89: error: `TC_TimeOfDay' undeclared (first use this 
   function)
example-cpp-common.h:89: error: (Each undeclared identifier is reported only 
   once for each function it appears in.)
example-cpp-common.h: In function `void operator<<=(CORBA::Any&, Time**)':
example-cpp-common.h:107: error: `TC_Time' undeclared (first use this function)
In file included from example-cpp-skels.cc:6:
example-cpp-skels.h: At global scope:
example-cpp-skels.h:14: error: redefinition of `class Time'
example-cpp-common.h:56: error: previous definition of `class Time'
example-cpp-skels.h:20: error: 'POA_Time' is used as a type, but is not defined 
   as a type.
example-cpp-skels.h:24: error: syntax error before `*' token
example-cpp-skels.h:29: error: ISO C++ forbids declaration of `POA_Time__epv' 
   with no type
example-cpp-skels.h:29: error: parse error before `;' token
example-cpp-skels.h:30: error: ISO C++ forbids declaration of `POA_Time__vepv' 
   with no type
example-cpp-skels.h:30: error: parse error before `;' token
example-cpp-skels.h:14: confused by earlier errors, bailing out


Thank you.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]