[aspectc-user] function call

Bin Du bin.du.rbst at gmail.com
Thu Apr 1 11:19:26 CEST 2010


hi all,
i have a question, haw can i call a c++ function in aspectc++

-------------main.cc----------------------

void func1 ( ) { ... };
void func2 ( ) { ... };
int main ( ) {
                    func1 ( );
                  //func2 ( );
}

-----------test.ah--------------------

aspect test{
 advice execution("% func1 (...) ") : before () {
        func2 ( );
};

ac++ issues the error:
                                 error: `func2' undeclared here


----------------------- main2.cc-----------------

class Base1
{
public:
   void ba1 ()
    {
     printf("Base2::b1 ()\n");
    }
}base1;

class Base
{
public:

    int b2 (inti)
    {   inttemp = i;
        return temp;
    }
} *a ;

int main()
{

    a->b2(0);

    //base1.b1(); same problem

    return 0;
}

Thanks in advance,
du bin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.aspectc.org/pipermail/aspectc-user/attachments/20100401/6a2fe785/attachment.html>


More information about the aspectc-user mailing list