[aspectc-user] Compiling helloworld aspect C++ on Symbian

Olaf Spinczyk Olaf.Spinczyk at informatik.uni-erlangen.de
Mon Sep 5 14:04:01 CEST 2005


Hi,

let's continue this conversation with direct mails and report only the 
results on the mailing list.

Olaf

Marti Bayo-alemany wrote:
> Hi,
> After using the following command lines, it didn't work properly...
> 
> ..\..\ac\ac++  -p source  -e cpp --skip-bodies-non-prj 
> --no_problem_spec_scope --gnu-2.95 -d ..\helloworld-out -I.  -D_DEBUG 
> -D_UNICODE -D__SYMBIAN32__ -D__GCC32__ -D__EPOC32__ -D__MARM__ 
> -D__MARM_ARMI__ -D__DLL__ 
> -I"C:\Symbian\7.0s\Series60_v20\Epoc32\include\" -I..\helloworld-out 
> -Isource
> 
> ..\..\ac\ac++  -p source  -e cpp --skip-bodies-non-prj 
> --no_problem_spec_scope --gnu-2.95 -d ..\helloworld-out -I.  -D_DEBUG 
> -D_UNICODE -D__SYMBIAN32__ -D__GCC32__ -D__EPOC32__ -D__MARM__ 
> -D__MARM_ARMI__ -D__DLL__ 
> -I"C:\Symbian\7.0s\Series60_v20\Epoc32\include\"  -Isource
> 
> The errors are ...
> source/aspect.ah:5: syntax error before `{' token
> In file included from :1,
>                 from source/helloworld_application.cpp:27:
> source/aspect.ah:5: syntax error before `{' token
> : In member function `virtual TUid CExampleApplication::AppDllUid() const':
> :3: `invoke_Action_Action_a0_around' undeclared in namespace `AC'
> : In member function `virtual CApaDocument*
>   CExampleApplication::CreateDocumentL()':
> :3: `invoke_Action_Action_a0_around' undeclared in namespace `AC'
> 
> I have simplified the aspect to ...
> #include <stdio.h>
> #include <flogger.h>
> #include <e32std.h>
> 
> aspect Action {
>  advice execution("% CExampleApplication::%(...)") : around()  {
>    
> RFileLogger::Write(_L("NSTMLogDir"),_L("AspectsTest"),EFileLoggingModeOverwrite,_L("Test")); 
> 
>  }
> };
> 
> Any idea ?
> best wishes,
> Marti
> 
> 
> ----- Original Message ----- From: "Olaf Spinczyk" 
> <Olaf.Spinczyk at informatik.uni-erlangen.de>
> To: "Marti Bayo-alemany" <malemany at nero.com>
> Cc: <aspectc-user at aspectc.org>
> Sent: Monday, September 05, 2005 12:42 PM
> Subject: Re: [aspectc-user] Compiling helloworld aspect C++ on Symbian
> 
> 
>> Hi,
>>
>> Marti Bayo-alemany wrote:
>>> Hi all,
>>> I have tried to use the STU mode but it is actually not working.
>>> The command is the following ...
>>> ..\..\ac\ac++  -g -p source  -c source\helloworld_application.cpp  -o 
>>> helloworld-out\helloworld_application.cpp -e cpp 
>>> --skip-bodies-non-prj --no_problem_spec_scope --gnu-2.95 -d 
>>> ..\helloworld-out -I.  -D_DEBUG -D_UNICODE -D__SYMBIAN32__ 
>>> -D__GCC32__ -D__EPOC32__  -D__MARM__ -D__MARM_ARMI__ -D__DLL__ 
>>> -I"C:\Symbian\7.0s\Series60_v20\Epoc32\include\"
>>>
>>> With the WPT mode the compiler is trying to include the aspect.ah 
>>> from source. Due aspect.ah is not a c++ files there is compilation 
>>> problems.
>>>
>>> I have tested on the following two paths structures
>>>
>>> symbian|
>>>            |->helloworld(*)|---->source
>>>                                     |---->helloworld-out
>>>
>>> ... and ...
>>>
>>> symbian|
>>>            |->helloworld(*)|---->source
>>>            |
>>>            |->helloworld-out
>>
>> the second directory structure is better! You shouldn't have the 
>> output directory in the source directory.
>>
>> Regarding the inclusion of the aspect header in the generated code, it 
>> might help to add a -I<directory> for every directory that contains an 
>> aspect header on the command line. In your case this means that you 
>> have to add -Isource.
>>
>> (explanation follows later)
>>
>> Does that help?
>>
>> Olaf
>>
>>
> 
> _______________________________________________
> aspectc-user mailing list
> aspectc-user at aspectc.org
> http://www.aspectc.org/mailman/listinfo/aspectc-user




More information about the aspectc-user mailing list