[aspectc-user] RE: help

saurabhj at mastek.com saurabhj at mastek.com
Mon Jan 19 10:56:52 CET 2004


I created a header file INANZUsermanager_AOP.h and includedall .hpp files in that now my tree is like this:

Usermanager
 |
 |--- INANZusermanager_UserManagerImpl.cpp
 |--- INANZUsermanager_AOP.ah
 |--- INANZUsermanager_AOP.h 
 |--- other1.hpp
 |--- other2.cpp
 |--- blah, blah, blah

after that I tried the command given by you 

ac++ -p usermanager -d usermanager-out -I Usermanager -ecpp -v9

i got following :

(1) compiler started looking for other template related header files and cpp files and giving error at 2-3 places, i.e.
 string : No such file or directory
 list   : No such file or directory
 map    : No such file or directory

(2) if i remove -ecpp option it is compiling  perfectly and creating a new directory usermanager-out. it is also creating a file ac_gen.cc but not creating a new file INANZusermanager_UserManagerImpl.cpp in directory usermanager-out .



==========================================================================


-----Original Message-----
From: Olaf Spinczyk [mailto:Olaf.Spinczyk at informatik.uni-erlangen.de] 
Sent: Monday, January 19, 2004 2:58 PM
To: Saurabh Jain
Cc: aspectc-user at aspectc.org
Subject: Re: [aspectc-user] RE: help

Hi,

saurabhj at mastek.com wrote:
> I have a project folder called usermanager. In this directory other files with extension .cpp and .hpp are there, i want to insert AOP code in a particular file named INANZusermanager_UserManagerImpl.cpp in Usermanager directory, for this task i created one file named INANZUsermanager_AOP.ah in Usermanager directory. now my folder tree is like this:
> 
> Usermanager
> |
> |--- INANZusermanager_UserManagerImpl.cpp
> |--- INANZUsermanager_AOP.ah
> |--- other1.hpp
> |--- other2.cpp
> |--- blah, blah, blah
> 
> now i am giving following command from command prompt:
> 
> ac++ -p usermanager -d usermanager\AOP_OUT -I INANZusermanager -ecpp -v9
> 
> after compilation compiler is creating new set of files in usermanager\AOP_OUT directory, ideally compiler should have created a new file INANZusermanager_UserManagerImpl.cpp in AOP_OUT directory, but why it is not creted ?
> 
> my INANZusermanager_UserManagerImpl.cpp file is linked with other files and header files also, can i compile only this file for weaving aop code.
> 
> please help me out  .. 
> 
> saurabh jain
> developer, mastek ltd
> mumbai- India
> saurabhj at mastek.com

if you use the whole program transformation mode the target directory 
should not be a subdirectory of the source directory. The next time you 
call ac++ you would weave in woven code, which is not what you wanted. 
The second problem is that your -I option was not correct. So better use:

ac++ -p usermanager -d usermanager-out -I Usermanager -ecpp -v9

As decribed below ac++ has a problem with your header file extension 
.hpp. As a workaround you could write a header file with the extension 
.h that includes all .hpp header files.

> -----Original Message-----
> From: Olaf Spinczyk [mailto:Olaf.Spinczyk at informatik.uni-erlangen.de] 
> Sent: Monday, January 19, 2004 2:11 PM
> To: Saurabh Jain
> Subject: Re: help
> 
> Hello,
> 
> saurabhj at mastek.com wrote:
> 
>>I am using ac++ compiler , I want to compile files with extension .cpp, > and my requirement is to create a output file ac_gen.cpp instead of 
>>default ac_gen.cc , but when I give -ecpp in command line the compiler 
>>starts compiling all the files having extension .cpp, I just want to 
>>compile the file say XYZ.cpp with aop file XYZ.ah, is it possible or 
>>not?if yes then how because my projects has so many files having 
>>extension .cpp also having other files having extension .hpp. Please 
>>help me out.
>>
>>Saurabh jain
> 
> 
> if you compile in the whole program tranformation mode (with -p ... -d 
> ...) and use the option -e cpp the file acgen.cpp will be created. In 
> the single translation unit mode you select the name of the output file > with the -o option. To generate an acgen.cpp use "-g -o acgen.cpp". This > is described in the compiler manual.
> 
> The header file extension .hpp is a problem, because ac++ searches all 
> project directories for files with the extension .h to generate 
> acgen.cpp/cc or manipulated header files. As a workaround you could 
> create a single file with the extension .h inside your project tree that > includes all your .hpp files.
> 
> I hope this helps for the moment. We know that this header file handling > needs a better solution, but that takes some time as other problems also > have to be handled urgently.
> 
> Best regards,
> 
> Olaf Spinczyk
> 
> PS: If you have any questions regarding C++ use either the mailing list > aspectc-user at aspectc.org or info at aspectc.org please.

Please, don't send your mails to all of these addresses. One is enough.

Thanks,

Olaf



MASTEK
"Making a valuable difference"
Mastek in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCO

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from all computers.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





More information about the aspectc-user mailing list