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

Matthias Urban matthias.urban at pure-systems.com
Thu Jun 17 13:40:45 CEST 2004


Hi,

Ruben Ortiz Gonzalez wrote:
> 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.
> 
> 
> 
> 
> 
> _______________________________________________
> aspectc-user mailing list
> aspectc-user at aspectc.org
> http://www.aspectc.org/mailman/listinfo/aspectc-user
> 

This seems to be a known VC6 compiler problem. The VC6 compiler isn't 
able to compile all of the (standard complient) code which is generated 
by ac++. Therefore we do not recommend to use ac++ with VC6 (see section 
4.2.3 of the compiler manual). Please try the VC7 compiler instead.

Matthias




More information about the aspectc-user mailing list