[aspectc-user] Problem with examples codes

Olaf Spinczyk Olaf.Spinczyk at informatik.uni-erlangen.de
Thu Jul 13 16:35:20 CEST 2006


this is a bug in the Makefile, which should have been modified when ac++ 
1.0pre3 was released.

The problem is that the parser of version 1.0pre3 only interprets 
"aspect" as a keyword if it is used in an aspect header file. In the 
case of the ID example an aspect is defined in a file called id.cc, 
which is not an aspect header. In order to allow the aspect keyword in 
ordinary *.cc files the ac++ option -k has to be used.

After this modification the examples will compile. Sorry for that.

- Olaf

Yan Mao wrote:
> Hallo,
> It's the first time for me to use Mail list, I hope, I did it correctly.
> I am new to AOP and AspectC++. 
> I began with the example codes from the compiler package, and found out that, the examples FigureObserver ID and Order dont work well.
> for example:
> ....\examples>ac++ -p ID -d ID-OUT  -v9
> * Running ac++ 1.0pre3
> * Simple Dependency Check
> * Handling Translation Unit `id.cc'.
>   - Path "ID/id.cc"
>   - Inserting namespace AC
>   - Parsing ...
> ID/id.cc:10: error: invalid declaration near token `IDs'
>   - Aborting
> I tried to seperate the Aspects in an .ah file, and it worked.
> I dont know, this is a bug of the compiler, or this is my problem.
> thanks
> Yan Mao

More information about the aspectc-user mailing list