[aspectc-user] Defining an Aspect Instantiation Model
Sergio Queiroz
sergio at consiste.dimap.ufrn.br
Tue Aug 23 13:59:25 CEST 2005
Olaf,
I tried to compile my files again with AspectC++ 0.9.2 but did not work too
Any other idea about what is the problem?
> ag++ -o main main.cpp -Wall
> myclass.h:22: error: field `myInstance' has incomplete type
> myaspect.ah:9: warning: all member functions in class `MyAspect' are private
> error: Execution failed: "g++" -o "main" -xc++ "main.acc" -xnone -Wall
Sérgio
---------- Original Message -----------
From: Olaf Spinczyk <Olaf.Spinczyk at informatik.uni-erlangen.de>
To: Sergio Queiroz <sergio at consiste.dimap.ufrn.br>
Cc: aspectc-user at aspectc.org
Sent: Fri, 19 Aug 2005 22:13:53 +0200
Subject: Re: [aspectc-user] Defining an Aspect Instantiation Model
> Hi Sergio,
>
> your problem is the same as the one reported by Sylvain Meunier at
> the beginning of august on this mailing list. It is a bug in ac++
> 0.9.3 :-(. You can solve the problem by going back to version 0.9.2.
>
> The problem is already fixed in our internal development version.
> You can expect that your example code will also work with the next
> ac++ version, on which we are currently working urgently.
>
> Sorry for this problem,
>
> Olaf
>
> Sergio Queiroz wrote:
> >Hi,
> >
> >I am trying to define an aspect in such way that every instance of a class has
> >an different aspect instance associated.
> >
> >I tried to follow the examples in the AspectC++ - A Language Overview and in
> >the AspectC++ Language Reference but they did not work :(
> >
> >When I try to compile my example with "ag++ -o main main.cpp -Wall" I get the
> >following message:
> >
> >myaspect.ah:9: warning: all member functions in class `MyAspect' are private
> >myclass.h:22: error: field `myInstance' has incomplete type
> >error: Execution failed: "g++" -xc++ "main.acc" -xnone -Wall -o "main"
> >
> >So, the first line of the message is easy to avoid but I could not declare the
> >variable myInstance.
> >
> >I am attaching my source code.
> >
> >Sérgio
> >
> >------------------------------------------------------------------------
> >
> >#include "myclass.h"
> >
> >#include <iostream>
> >
> >using namespace std;
> >
> >int
> >main() {
> > MyClass m1, m2;
> >
> > m1.setM (8);
> >
> > m2.setM (7);
> >
> > cout << m1.getM () << endl;
> >
> > cout << m2.getM () << endl;
> >
> > return 0;
> >}
> >
> >------------------------------------------------------------------------
> >
> >#ifndef MYCLASS_H
> >#define MYCLASS_H
> >
> >class MyClass {
> >
> > public:
> >
> > MyClass () {
> > m = 4;
> > }
> >
> > int getM () {
> > return m;
> > }
> >
> > void setM (int a) {
> > m = a;
> > }
> >
> > private:
> > int m;
> >};
> >
> >#endif // MYCLASS_H
> >
> >------------------------------------------------------------------------
> >
> >_______________________________________________
> >aspectc-user mailing list
> >aspectc-user at aspectc.org
> >http://www.aspectc.org/mailman/listinfo/aspectc-user
> >
------- End of Original Message -------
More information about the aspectc-user
mailing list