[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 ...
@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. 

@released */
enum TGulVAlignment
 /** Object is aligned with the top. */
 /** Object is centred vertically. */
 /** Object is aligned with the bottom. */

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

@released */
enum TGulAlignmentValue
 /** Object is left and top aligned. */
 /** Object is left aligned and centred vertically. */
 /** Object is left aligned and at the bottom. */
 /** Object is centre aligned horizontally and at the top. */
 /** Object is centred horizontally and vertically. */
 /** Object is centred horizontally and at the bottom. */
 /** Object is right and top aligned. */
 /** Object is right aligned and centred vertically. */
 /** Object is right aligned and at the bottom. */

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,
-------------- 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