[aspectc-user] compile error

Sven Apel sven-apel at web.de
Mon Oct 20 20:11:41 CEST 2003


Hello, 

after the code weaving during the compilation process I get the follwoing error message:

ac++ -v1 -I . -p . -d aspect-out
* Running ac++ 0.7.2
* Simple Dependency Check
* Handling Translation Unit `main.cc'.
* Handling Translation Unit `SmartPointer.cc'.
* Handling include files and link-once code
* Saving
* Done
make -C aspect-out
make[1]: Entering directory `/home/apel/Entwicklung/Lokale Entwicklung/GarbageCollection/aspect-out'
g++ -c main.cc ac_gen.cc SmartPointer.cc
./SmartPointer.cc:9: error: `undefined' was not declared in this scope
./SmartPointer.cc:9: error: syntax error before `(' token
./SmartPointer.cc:15: error: `undefined' was not declared in this scope
./SmartPointer.cc:15: error: syntax error before `(' token
./SmartPointer.cc:17: error: `undefined' was not declared in this scope
./SmartPointer.cc:17: error: '
   a0_after_GarbageCollector_call_SmartPointerSmartPointer_F12SmartPointeru11'
   is used as a type, but is not defined as a type.
./SmartPointer.cc:18: error: parse error before `}' token
./SmartPointer.cc: In constructor `SmartPointer::SmartPointer(void*)':
./SmartPointer.cc:21: error: `
   __call_SmartPointerSmartPointer_F12SmartPointeru11' undeclared (first use
   this function)
./SmartPointer.cc:21: error: (Each undeclared identifier is reported only once
   for each function it appears in.)
./SmartPointer.cc:21: error: `undefined' undeclared (first use this function)
./SmartPointer.cc:21: error: `PvE_0_0' undeclared (first use this function)
./SmartPointer.cc: At global scope:
./SmartPointer.cc:25: error: syntax error before `~' token
./SmartPointer.cc:31: error: syntax error before `~' token
./SmartPointer.cc:33: error: syntax error before `~' token
./SmartPointer.cc: In destructor `SmartPointer::~SmartPointer()':
./SmartPointer.cc:37: error: `__call_SmartPointer' undeclared (first use this
   function)
./SmartPointer.cc:37: error: parse error before `~' token
make[1]: *** [all] Fehler 1

to clarify the problem I have attached the corresponding code:

class SmartPointer
{
private:
        void *m_ptr;
        SmartPointer();
        void Create();
        void Delete();
public:
        SmartPointer(void *);
        ~SmartPointer();
        void *operator -> ();

};

aspect GarbageCollector
{
        unsigned int m_count;

        GarbageCollector() : m_count(0) {}

        advice call("% SmartPointer::Create(...)") : after ()
        {
                m_count++;
        }

        advice call("% SmartPointer::Delete(...)") : after()
        {
                m_count--;
        }
};

Have I overlooked a fault?

greetings,
Sven
______________________________________________________________________________
Zwei Mal Platz 1 mit dem jeweils besten Testergebnis! WEB.DE FreeMail
und WEB.DE Club bei Stiftung Warentest! http://f.web.de/?mc=021183




More information about the aspectc-user mailing list