[aspectc-user] Object file with aspectc++

Matthias Urban matthias.urban at pure-systems.com
Mon Mar 3 12:08:38 CET 2008


Hi,

> i would like to use aspects with already generated object file (.o). I
> tryied to do that with a simple example. Here is my example:
> test.cpp file:
> ...
> Makefile :
> 
> .PHONY: all
> all : test.o test_1.ah test.h
> 	cp test.o testStudent.o
> 	ag++ testStudent.o -a test_1.ah
> 	g++ testStudent.o -o test
> ... 
> -First I generated .o file by typing: ag++ -c test.cpp test.h
> -Later on I used make command
> -It works fine...but if I change aspect file (.ah) only, it doesn't
> include that in weaving proccess (when I use make).

ac++ is not able to introduce advice into object files. It is a source 
transformation tool and thus can only weave into source files (.cpp, .h 
etc). Your ag++ calls do not look right. It should be something like:

ag++ -a test_1.ah -o test test.cpp

Please refer to the ag++ manual 
(http://www.aspectc.org/fileadmin/documentation/ag-man.pdf) for detailed 
information on how it is used.

Best regards,
Matthias



More information about the aspectc-user mailing list