[aspectc-user] Even a simple hello world isn't working...

Olaf Spinczyk os at aspectc.org
Tue Jul 8 14:19:54 CEST 2014


Hi!

I haven't looked deeper into that problem, but 'call()' is definitely no valid 
AspectC++ pointcut expression. You could try execution("int main()") instead.

Of course, there should be an error message instead of a segfault!

Best regards,

Olaf


On 07/08/2014 12:45 PM, Jannis Stoppe wrote:
> I recently came across AspectC++, but while it seems to be more or less
> a perfect solution for what I'm trying to achieve, I just can't get it
> up and running even for a simple example...
>
> I have two files, helloWorld.ah
>
> #inlcude <iostream>
>
> aspect Tracer
> {
>     advice call() : before()
>     {
>        std::cout << "aspect";
>     }
> };
>
>
> and helloWorld.cpp
>
> #include <iostream>
>
> int main()
> {
>    std::cout << "Hello World!";
> }
>
> This is how running ag++ looks like:
>
> ag++ output helloWorld.cpp
> Segmentation fault (core dumped)
> error: Execution failed: "ac++" --config "/tmp/agxx_pcfgfRiq9Z"  -p. -c
> "helloWorld.cpp" -o "/tmp/helloWorld.cpp_agxx_fvDpLq"
>
> Same for ac++:
>
> ac++ -p ./AspectHelloWorld/ -d ./AspectResult/
> Speicherzugriffsfehler (Speicherabzug geschrieben)
>
> (it basically just says "Segmentation fault (core dumped)", but my
> system is set to German).
>
> I'm running
>
> ac++ 1.1 (Jul  1 2012)
> ag++ 0.8  built: Jul  1 2012
> Ubuntu 14.04 (trusty)
>
> The AspectC++ builds are simply taken from the Ubuntu servers, but the
> stable version I just downloaded from the website reports the same
> version number, so I guess it's a current build.
>
> Any idea what's going on there? Thanks in advance.
>
> _______________________________________________
> aspectc-user mailing list
> aspectc-user at aspectc.org
> http://www.aspectc.org/mailman/listinfo/aspectc-user
>




More information about the aspectc-user mailing list