FW: [aspectc-user] Visual Studio and ac++ ?

Benoit Lefevre benoit.lefevre-prestataire at calyon.com
Tue Mar 18 17:06:54 CET 2008

Hi Matthias

	I finally found time to try ac++ with VC8.

	Your advice helped me a lot as I had the Trace example producing 
	weaved source file. 

	I didn't try to compile this file as it wasn't relying on very complex

	Instead, I directly tried to weave a very simple aspect on one of my
	project cpp file.

	That's where troubles got in (4 of them).

	I don't intend to ask you with this mail to solve them as VC8 is not 
	clearly stated as been supported, but rather help you (a little) for
	your future port of visual studio 7 Plug-in toward the VC8 version.

	All these troubles occurred at parsing step while using the -v9 option
	of ac++

	Here they are :

		1) ac++ don't seem to support that kind of include preprocessor
		command containing windows style backslash path separators :

			#include <in\here.h>
		But maybe it is rather due to Visual Studio supporting an out of
		C++ specification feature ?

		2) I got stuck on a strange class declaration :

		Here is a simplified extract of what is causing this trouble :

	template <bool _SECURE_VALIDATION>
	class _Iterator : public _Const_iterator<_SECURE_VALIDATION>


		typedef typename _If<_SECURE_VALIDATION,

		friend _Iterator<false>;
		friend _Iterator<true>;



		ac++ don't like the first friend declaration.
		Note that, as I don't know what can cause this trouble, maybe I
		simplified too much this extract.

		3) The following extract of file crtwrn.h is not parsable for
		ac++ because of the second backslash :

#define _CRTWRN_MESSAGE__NO_ITERATOR_DEBUGGING Iterator debugging not \
        supported in retail builds.\n  \
        Setting _HAS_ITERA##TOR_DEBUGGING=0	

		4) The "using namespace" formulation doesn't seem to be
		supported by ac++, at least fot the following example:

#include <aFile.h>	// namespaces are declared within aFile.h
using namespace namespaceOne;

class A : public B

	// namespaceTwo is defined within namespaceOne
	namespaceTwo::aType myVariable;


		An error is reported on "myVariable" declaration.

	Hope it will help.

	Best regards.

Benoit Lefevre.

-----Original Message-----
From: Matthias Urban [mailto:matthias.urban at pure-systems.com] 
Sent: Wednesday, February 27, 2008 2:58 PM
To: Lefevre, Benoit (CALYON)
Cc: aspectc-user at aspectc.org
Subject: Re: [aspectc-user] Visual Studio and ac++ ?


it's definitely not a "piece of cake" to use ac++ directly on VC++ code, 
but it's also not a nightmare. I don't exactly know all changes between 
VC7 and VC8. But I know that at least new keywords were introduced. If 
you have access to a VS2003, then install the AspectC++ Add-In and look 
how it solves these problems (there is a configuration file with 
#defines and some required declarations in an extra header file that is 
automatically included, the Add-In log file contains the corresponding 
ac++ call).

When the next ac++ release is out (in the near future), then a new 
AspectC++ Add-In should be available (for VC7 and for VC8) too.

Best regards,

> 	In fact I have access to both environments because the software in 
> 	which one I'd like to introduce aspect usage started its life cycle 
> 	with pre Visual Studio 8 versions (VC6 then VC7).
> 	But it has recently moved to VC8 in the main development branch.
> 	As using AOP is only relevant in this branch and the available 
> 	AspectC plug-in is referenced as working only with VC7, I thought the 
> 	direct usage of ac++.exe with VC8 was my only option.
> 	Am I wrong ?
> 	If I'm not, is it THAT complex to use ac++ directly (ranking from
> 	"Nightmare" to "piece of cake") ?
> 	Reading the ac++ weaver online documentation makes me feel like it's 
> 	possible.

Matthias Urban
Phone: +49-391-544569-32 Fax: +49-391-544569-90
pure-systems GmbH
Geschäftsführung: Danilo Beuche, Holger Papajewski
Sitz der Gesellschaft: Magdeburg
Registergericht: Amtsgericht Magdeburg, HRB 13044
-------------- next part --------------
Ce message et ses pièces jointes (le "message") est destiné à l'usage    
exclusif de son destinataire.                                            
Si vous recevez ce message par erreur, merci d'en aviser immédiatement   
l'expéditeur  et de le détruire ensuite. Le présent message  pouvant  
être altéré à notre insu,  CALYON Crédit Agricole CIB                              
ne peut pas être engagé par son contenu. Tous droits réservés. 
This message and/or any  attachments (the "message") is intended for     
the sole use of its addressee.                                            
If you are not the addressee, please immediately notify the sender and    
then destroy the message.  As this message and/or any attachments may 
have been altered without our knowledge,  its content  is not legally 
binding on CALYON Crédit Agricole CIB. All rights reserved.                                                                

More information about the aspectc-user mailing list