[aspectc-user] Problem trying to compile with VC6 a simple sample

Ruben Ortiz Gonzalez rortiz at espelsa.es
Thu Jun 17 11:46:48 CEST 2004


Hi,

I am trying to evaluate AOP and aspectc in order to decide if we incorporate
this new technology to our projects. After read the documentation manuals, i
have seen that probably aspectc only runs with VC7, but I decided trying to
compile with VC6 because i am only making simple samples.

After set the required preprocessor directives (#ifndef __aspect_Miasp__,
etc), the result is the following:

> cl main.cpp ac_gen.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

main.cpp
examples/ejemplo/main.cpp(39) : error C2893: Failed to specialize function
templ
ate 'void __cdecl AC::invoke_Miasp_Miasp_a0_before(JoinPoint *)'
        With the following template arguments:
        'struct TJP__ZN1A9calculateEPKc'
ac_gen.cpp

The aspect is really simple:


#ifndef __aspect_Miasp__
#define __aspect_Miasp__

#include <stdio.h>

aspect Miasp {
  advice execution("% A::%(...)") || execution("% b(...)") : before()  {
    printf("A: before(exec) %s\n", JoinPoint::signature());
    printf("that  : %p\n" , tjp->that());
    printf("target: %p\n" ,tjp->target());
  }
};

#endif


Any help? Should i use the VC7 compiler?

Thanks a lot.








More information about the aspectc-user mailing list