[aspectc-user] Problem parsing CORBA template class.

Toni SOUEID tsoueid at yahoo.com
Tue Jul 27 10:53:29 CEST 2004


Hello Olaf,

Indeed I did not know I have to generated myself the
ac_gen.cc file in STU mode.

Now this particular error has gone.

Instead I am now blocked on another error that is the
following :

----------------
distributeur_impl.cxx:56: no `void 
Distributeur_i::__exec_old_register_client ()' member
function declared 
in class `Distributeur_i'
distributeur_impl.cxx:69: no `void
Distributeur_i::__exec_old_destroy 
()' member function declared in class `Distributeur_i'
distributeur_impl.cxx:90: no `void 
Distributeur_i::__exec_old_inserer_piece (double)'
member function 
declared in class `Distributeur_i'
distributeur_impl.cxx:100: no `void 
Distributeur_i::__exec_old_choisir_boisson (const char
*)' member 
function declared in class `Distributeur_i'
distributeur_impl.cxx:110: no `void 
Distributeur_i::__exec_old_recuperer_boisson ()'
member function 
declared in class `Distributeur_i'
make: *** [distributeur_impl.o] Error 1
----------------

I suppose that the new modified code is unable to find
the functions mentioned above which represent my code
although i can see that they are inline functions
inside my c++ source file.

Does the problem has to do with using the old header
files and not letting ac++ generated new ones ?

--- Olaf Spinczyk
<Olaf.Spinczyk at informatik.uni-erlangen.de> wrote:
> Hi Toni,
> 
> Toni SOUEID wrote:
> > Hello Olaf,
> > 
> > I managed to get my simple aspect (that prints a
> > string on the screen after the execution of every
> > method call of my corba servant) to get weaved
> against
> > my code.
> > 
> > I also managed to compile my resulting C++ file
> into
> > an object file.
> > 
> > Now i can't link my object files together because
> i
> > get the following error :
> > 
> > ---
> > distributeur_impl.o: In function
> > `_CORBA_Sequence<unsigned char>::freebuf(unsigned
> char
> > *)':
> >
>
/local/SALOME/prerequis/omniORB-3.0.5/include/omniORB3/seqtemplates.h(.GM::gnu.linkonce.t.aspectof(void)+0x4):
> > undefined reference to `GM::__instance'
> > collect2: ld returned 1 exit status
> > ---
> > 
> > distributeur_impl.o is my object file
> > and GM is the name of my aspect.
> > 
> > Do you have any suggestions on how to solve this
> > problem ?
> > 
> > I will attach my simple application as soon as i
> clean
> > the code up.
> > 
> > Thanks
> > 
> > 
> > --- Olaf Spinczyk
> > <Olaf.Spinczyk at informatik.uni-erlangen.de> wrote:
> > 
> >>Hi Toni,
> >>
> >>Toni SOUEID wrote:
> >>
> >>>Hello,
> >>>
> >>>I am trying to use AspectC++ to aspectualize some
> >>
> >>of
> >>
> >>>the code of a simple distributed application
> based
> >>
> >>on
> >>
> >>>CORBA (RedHat Linux 7.2, omniORB 3.0.5, and
> >>
> >>AspectC++
> >>
> >>>0.9pre1).
> >>>
> >>>I am trying to introduce aspects in my own code
> >>
> >>and
> >>
> >>>not at the CORBA ORB level.
> >>>
> >>>To parse my application code, ac++ has to parse a
> >>
> >>lot
> >>
> >>>of CORBA header files. With my simple
> application,
> >>>ac++ can't continue to the end, but instead
> >>
> >>generates
> >>
> >>>a parsing error which is the following :
> >>>
> >>>
> >>
>
>>/omniORB-3.0.5/include//omniORB3/seqtemplates.h:297:
> >>
> >>>error: invalid member declaration near token
> >>>`_CORBA_Sequence'
> >>>
> >>>the code section pointed to by the error is the
> >>>following :
> >>>
> >>>...
> >>>template <class T>
> >>>class _CORBA_Unbounded_Sequence : public
> >>>_CORBA_Sequence<T> {
> >>>public:
> >>>  typedef _CORBA_Sequence<T> BaseT ;
> >>>...
> >>>
> >>>It seems to be a very simple usage of templates
> in
> >>
> >>C++
> >>
> >>>and I can't find the reason why ac++ can parse
> >>
> >>such
> >>
> >>>code.
> >>>
> >>>If would really appreciate if anyone has an idea
> >>
> >>about
> >>
> >>>this error and eventually how to override such
> >>
> >>code to
> >>
> >>>make ac++ work ?
> >>>
> >>>Thanks,
> >>>
> >>>Tony
> >>
> >>The code listed above is ok. It can be parsed by
> >>ac++. There is probably 
> >>a problem with the symbol information ac++
> collected
> >>before coming to 
> >>these lines.
> >>
> >>To find out what's wrong we have to install the
> OMNI
> >>ORB and try runing 
> >>ac++ with your code. Could you please send me your
> >>"simple application"?
> >>
> >>Olaf
> >>
> > 
> > 
> >>ATTACHMENT part 2 application/x-pkcs7-signature
> > 
> > name=smime.p7s
> > 
> > 
> > 
> > =====
> > Toni SOUEID
> > Computer and Communications Engineer
> > Maison du Liban
> > 9E, boulevard Jourdan
> > 75014 Paris
> > France
> > Tel : +33 1 44 16 27 88
> > http://tonysoueid.multimania.com
> 
> I'm happy that you were more successful this time.
> Meanwhile I tried the 
> "Echo" example and that also worked.
> 
> The problem with GM::__instance is related to the
> so-called "link-once 
> code". It seems that you did not link your
> application with the 
> ac++-generated link-once code. Doing this is
> necessary, because the 
> link-once code contains the definitions of the
> aspect instances.
> 
> You can generate the link-once code with the -g
> option. Read the ac++ 
> compiler manual for further details.
> 
> Best regards,
> 
> Olaf
> 


=====
Toni SOUEID
Computer and Communications Engineer
Maison du Liban
9E, boulevard Jourdan
75014 Paris
France
Tel : +33 1 44 16 27 88
http://tonysoueid.multimania.com


		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 



More information about the aspectc-user mailing list