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

Marti Bayo-alemany malemany at nero.com
Fri Sep 2 15:10:01 CEST 2005


Hi Olaf and all aspectc users,

I have compile a helloworld application on Symbian. I've gotten some errors with the header files. 

First I added the following defines to ac++ command line ( Important is -D__GCC32__)

..\..\ac\ac++ -p . --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__

There is some problems from Aspect C++ to process two things.
One is some kind of enums, the other is the preprocessor #undef.

I edited some enums from gulalign.h.
The enums on that file are now ...
@publishedAll
@released */
enum TGulHAlignment
 {
 /** Object is left-aligned. */
 EHLeft= ELeft,
 /** Object is centred horizontally. */
 EHCenter= ECenter,
 /** Object is right-aligned. */
 EHRight= ERight
 };

/** Vertical layout settings for graphic objects. 

@publishedAll
@released */
enum TGulVAlignment
 {
 /** Object is aligned with the top. */
 EVTop=0x00,
 /** Object is centred vertically. */
 EVCenter=0x10,
 /** Object is aligned with the bottom. */
 EVBottom=0x20
 };

/** Alignment settings for the layout of graphic objects. 

@publishedAll
@released */
enum TGulAlignmentValue
 {
 /** Object is left and top aligned. */
 //EHLeftVTop=EHLeft|EVTop,
 EHLeftVTop=ELeft|EVTop,
 /** Object is left aligned and centred vertically. */
 //EHLeftVCenter=EHLeft|EVCenter,
 EHLeftVCenter=ELeft|EVCenter,
 /** Object is left aligned and at the bottom. */
 //EHLeftVBottom=EHLeft|EVBottom,
 EHLeftVBottom=ELeft|EVBottom,
 /** Object is centre aligned horizontally and at the top. */
 //EHCenterVTop=EHCenter|EVTop,
 EHCenterVTop=ECenter|EVTop,
 /** Object is centred horizontally and vertically. */
 //EHCenterVCenter=EHCenter|EVCenter,
 EHCenterVCenter=CGraphicsContext::ECenter|EVCenter,
 /** Object is centred horizontally and at the bottom. */
 //EHCenterVBottom=EHCenter|EVBottom,
 EHCenterVBottom=CGraphicsContext::ECenter|EVBottom,
 /** Object is right and top aligned. */
 //EHRightVTop=EHRight|EVTop,
 EHRightVTop=CGraphicsContext::ERight|EVTop,
 /** Object is right aligned and centred vertically. */
 //EHRightVCenter=EHRight|EVCenter,
 EHRightVCenter=CGraphicsContext::ERight|EVCenter,
 /** Object is right aligned and at the bottom. */
 //EHRightVBottom=EHRight|EVBottom
 EHRightVBottom=CGraphicsContext::ERight|EVCenter,
 };

There was another problem in  eikdef.h with the undef private. I've just commented. I hope it will be okey. 
#define private public
#include <ASShdBitFlags.h>
//#undef private

It seems that Aspect C++ doesn't support __declspec(dllexport)  which is needed in order to get an application running on Symbian

#define EXPORT_C __declspec(dllexport) 
EXPORT_C CApaApplication* NewApplication()

I get that ...
invalid declaration near token `dllexport'

I comment the EXPORT_C before ac++ and I added after EXPORT_C manually to the file generated.
The application compiles and it runs on the mobile phone.

However is still not doing what I am expecting but I am on the way.

Best wishes,
Marti 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.aspectc.org/pipermail/aspectc-user/attachments/20050902/dd352a3e/attachment.html>


More information about the aspectc-user mailing list