Target Types

Generation of STDEXE, STDDLL and STDLIB

The introduction of two new Symbian platform target types, STDEXE and STDDLL, was required to enable the specific options for compilers and linkers to generate P.I.P.S. executables.

P.I.P.S. executables are implemented using native Symbian platform executables linked statically to the glue code. The target types STDEXE and STDDLL make symbol information available for lookup by name.

For each new target type the following library files, system files and include paths are included by default. The table below shows the additional libraries and paths for the new target types.

Target Type

File/Path

Purpose

STDEXE

libcrt0.lib

Multithreaded 'glue code' library. Provides the E32Main() entry point for a .exe that uses the char main() function.

STDEXE

libwcrt0.lib

Multithreaded 'glue code' library. Provides the E32Main() entry point for a .exe that uses the wide char main() function.

STDEXE | STDDLL | STDLIB

euser.lib, backend.lib

Fundamental libraries that are linked by default for STDEXE s and STDDLL s.

STDEXE | STDDLL | STDLIB

\epoc32\include\stdapis

Location of standard header files for P.I.P.S..

The new target types for P.I.P.S. are STDEXE, STDDLL and STDLIB (STDLIB s are the P.I.P.S. static libraries). For STDLIB s, the user need not annotate source with EXPORT_C or IMPORT_C. All symbols with extern linkage are:

  1. exported if they are defined in the module, and

  2. imported if they are referred to but not defined.

The compiler marks the symbols imported/exported for STDLIB s, while for native Static Libraries the user explicitly needs to specify EXPORT_C /IMPORT_C.

WCHARENTRYPOINT - new keyword

The user should include the new keyword WCHARENTRYPOINT in MMP files to select the Glue code (CRT0) library for the wide char main entry point, libwcrt0.lib. This option is valid only for the STDEXE target type and will be ignored if used with other target types.

External functions and symbols exported by default

With a STDDLL library, functions and data with external linkage are exported by default, without any requirement for the IMPORT_C and EXPORT_C declarations in header or source files. It is important to note that in the Linux world all symbols with external linkage are visible outside a shared object.

When porting C APIs to the Symbian platform, the user should use the new STDDLL target type to indicate to the tool chain that all functions and global data should be exported.