Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

How to use GCCE and Open C

From Wiki
Jump to: navigation, search
Article Metadata
Created: spark55 (11 Sep 2007)
Last edited: hamishwillee (27 Jul 2012)

How to use GCCE and Open C

There can be a problem when compiling an Open C application containing the main() entry point and using the GCCE target compiler. A workaround solution is described here:

Patch the file \epoc32\tools\compilation_config\ file with the following:


Include a header called staticlibinit_gcce.h once within the application source code. Modify the MMP file with the following statements: STATICLIBRARY libcrt0.lib

Build the application using the GCCE target like abld build gcce urel.

The simple helloworld code which does this may look like the following:

#include <stdio.h>
#ifdef __GCCE__
// The following line is necessary in one file
#include <staticlibinit_gcce.h>
int main(void)
printf("Hello World\n");
return 0;

Compilation with GCCE

  • Compilation with <a href="GCCE">GCCE</a> : warning: command line option "-Wno-ctor-dtor-privacy" is valid for C++/ObjC++ but not for C
  • Since, <a href="Open C Description">Open C</a> headers are located in \epoc32\include\stdapis,

"SYSTEMINCLUDE \epoc32\include\stdapis" must be included in the MMP file.

But wait!  The above include doesn't seem to help.  Instead, as in the first section on this page, patch the file \epoc32\tools\compilation_config\ file, this time with the following:

# Moved "-Wno-ctor-dtor-privacy" to CPP_LANG_OPTION below
CC_WARNINGS_CONTROL_OPTION=-Wall -Wno-unknown-pragmas

and further down the file:

CPP_LANG_OPTION=-x c++ -Wno-ctor-dtor-privacy

This silences the warning message when compiling ANSI C code.

Internal Links

Compiling C-code in UREL mode

This page was last modified on 27 July 2012, at 04:17.
39 page views in the last 30 days.