[aspectc-user] RE: help
Olaf Spinczyk
Olaf.Spinczyk at informatik.uni-erlangen.de
Mon Jan 19 10:27:30 CET 2004
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
More information about the aspectc-user
mailing list