S60 Open C
Compilers and IDEs Using Open C

Compilers and IDEs Using Open C

Table of Contents

How to use GCCE and Open C

 


How to use GCCE and Open C

There are some known issues when compiling an Open C application containing the main() entry point and using the GCCE target compiler. A workaround is described in this section:

  1. Patch file \epoc32\tools\compilation_config\gcce.mk file with the following:
    AR=arm-none-symbianelf-ar
    ARCHIVER=$(AR)
    export ARCHIVER
    
  2. Include a header called staticlibinit_gcce.h once within the application source code.
  3. Modify the MMP file with the following statements:
    STATICLIBRARY libcrt0.lib
    
  4. Build the application using the GCCE target like abld build gcce urel.
The user code may look like the following:
#include <stdio.h>

#ifdef __GCCE__
#include <staticlibinit_gcce.h>  // This is needed in one file
#endif

int main(void)
{
   printf("Hello Open C!\n");
   printf("Press a character to exit!");
   getchar();
   return 0;
}

Give feedback of this section


©Nokia 2007

Back to top


This material, including documentation and any related computer programs, is protected by copyright controlled by Nokia. All rights are reserved. Copying, including reproducing, storing, adapting or translating, any or all of this material requires the prior written consent of Nokia. This material also contains confidential information, which may not be disclosed to others without the prior written consent of Nokia.

Nokia is a registered trademark of Nokia Corporation. S60 and logo is a trademark of Nokia Corporation. Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. Other company and product names mentioned herein may be trademarks or tradenames of their respective owners.