Welcome! Log In Create A New Profile

Advanced

idl and compiler parameters

Posted by bobj 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
idl and compiler parameters
March 31, 2006 08:39AM
Hi Leon (cross-posted to forum)

The "hint" suggests that you run the idl compiler like this:

idl --c++-impl currency.idl

This will generate the same currency.h and currency.cc files as before as well as currency_impl.h and currency_impl.cc. These files should be syntactically and structurally correct but require you to edit them to provide the missing functionality.

You cannot compile any of these files by simply typing
c++ currency_impl.cc

The compiler needs to be provided with additional parameters indicating where to search for header files (eg. CORBA.h) etc. The simplest way of providing these parameters is to make use of a Makefile. Please refer to your tut102 for details.

Regards
Bob

Leon van Rensburg wrote:
> Dear lecturer
> I am sending you some code that I tried to complile.I am getting the same
> errors trying to do the question for assignment 1.
> The file named compiler contain the code generated by the compiler.
>
> There are a hint given to us for Q3 of Assignment 1:Run the idl compile
> with -c++-impl
> Does this meanI should type
> idl currency.idl(this will greate a header and a .cc file)
> and then
> c++ currency_impl.cc. Should I be doing something else or do I understand
> the hint correctly.
>
> I appreciate the help.
>
> Tinus J van Rensburg
> nr:33852731
>
>
> ------------------------------------------------------------------------
>
> C:\unisa\mico\demo\poa\test>c++ hallo_impl.cc
> In file included from hallo_impl.h:3,
> from hallo_impl.cc:2:
> hallo.h:8:19: CORBA.h: No such file or directory
> hallo.h:9:24: mico/throw.h: No such file or directory
> In file included from hallo_impl.h:3,
> from hallo_impl.cc:2:
> hallo.h:20: syntax error before `;' token
> hallo.h:21: syntax error before `;' token
> hallo.h:31: `CORBA' is not a class or namespace
> hallo.h:32: `Object' is not a class or namespace
> hallo.h:41: `CORBA' was not declared in this scope
> hallo.h:41: parse error before `::' token
> hallo.h:42: `CORBA' was not declared in this scope
> hallo.h:42: parse error before `::' token
> hallo.h:42: `static Hallo* Hallo::_narrow(...)' and `static Hallo*
> Hallo::_narrow(...)' cannot be overloaded
> hallo.h: In static member function `static Hallo* Hallo::_duplicate(Hallo*)':
> hallo.h:45: `CORBA' undeclared (first use this function)
> hallo.h:45: (Each undeclared identifier is reported only once for each function
>
> it appears in.)
> hallo.h:45: parse error before `;' token
> hallo.h: At global scope:
> hallo.h:81: `PortableServer' is not a class or namespace
> hallo.h:82: `StubBase' is not a class or namespace
> hallo.h:84: parse error before `::' token
> hallo.h:98: `PortableServer' is not a class or namespace
> hallo.h:99: `StaticImplementation' is not a class or namespace
> hallo.h:103: parse error before `::' token
> hallo.h:104: parse error before `::' token
> hallo.h:105: ISO C++ forbids declaration of `CORBA' with no type
> hallo.h:105: `CORBA' declared as a `virtual' field
> hallo.h:105: declaration of `int POA_Hallo::CORBA'
> cc1plus.exe: changes meaning of `CORBA' from `<declaration error>'
> hallo.h:105: parse error before `::' token
> hallo.h:106: ISO C++ forbids declaration of `CORBA' with no type
> hallo.h:106: `CORBA' declared as a `virtual' field
> hallo.h:106: declaration of `int POA_Hallo::CORBA'
> cc1plus.exe: changes meaning of `CORBA' from `<declaration error>'
> hallo.h:106: declaration of `int POA_Hallo::CORBA'
> hallo.h:105: conflicts with previous declaration `int POA_Hallo::CORBA'
> hallo.h:106: parse error before `::' token
> hallo.h:107: ISO C++ forbids declaration of `CORBA' with no type
> hallo.h:107: `CORBA' declared as a `virtual' field
> hallo.h:107: declaration of `int POA_Hallo::CORBA'
> cc1plus.exe: changes meaning of `CORBA' from `<declaration error>'
> hallo.h:107: declaration of `int POA_Hallo::CORBA'
> hallo.h:105: conflicts with previous declaration `int POA_Hallo::CORBA'
> hallo.h:107: parse error before `::' token
> hallo.h:110: `PortableServer' was not declared in this scope
> hallo.h:110: parse error before `::' token
> hallo.h:111: ISO C++ forbids declaration of `CORBA' with no type
> hallo.h:111: `CORBA' declared as a `virtual' field
> hallo.h:111: declaration of `int POA_Hallo::CORBA'
> cc1plus.exe: changes meaning of `CORBA' from `<declaration error>'
> hallo.h:111: declaration of `int POA_Hallo::CORBA'
> hallo.h:105: conflicts with previous declaration `int POA_Hallo::CORBA'
> hallo.h:111: parse error before `::' token
> hallo.h:106: duplicate member `POA_Hallo::CORBA'
> hallo.h:107: duplicate member `POA_Hallo::CORBA'
> hallo.h:111: duplicate member `POA_Hallo::CORBA'
> hallo.h:125: syntax error before `::' token
> In file included from hallo_impl.cc:2:
> hallo_impl.h:6: parse error before `{' token
> hallo_impl.cc:3: parse error before `::' token
> hallo_impl.cc:3: invalid use of undefined type `class hallo_impl'
> hallo_impl.h:5: forward declaration of `class hallo_impl'
> hallo_impl.cc: In member function `void hallo_impl::morning(...)':
> hallo_impl.cc:4: use of namespace `std' as expression
> hallo_impl.cc:4: parse error before `:' token
>
> C:\unisa\mico\demo\poa\test>

Sorry, only registered users may post in this forum.

Click here to login