Symbian Developer Library


[Index] [Previous] [Next]

C Standard Library example code

These examples all use code written in C, and therefore link against the C Standard Library.

Some of the code used in the ConsoleApp example has been copied from the FreeBSD source code (see

Hello — Hello world

Found in: epoc32ex\stdlib\Hello


Hello is the most basic example demonstrating how to use the C Standard Library.

The main point to note is the .mmp project specification file, which specifies the epoc32\include\libc\ include directory and links against estlib.lib, the C Standard Library, and the static library ecrt0.lib.


ConsoleApp — simple console program

Found in: epoc32ex\stdlib\ConsoleApp


This is a simple console-based C Standard Library program. It converts quantities from one unit of measurement into another. The user is prompted for input. Conversion information is provided by the file slunits.dat.


Enter the type of unit you want to convert from, and then the type of unit you want to convert to. For example, to convert from inches to centimetres, enter "in", then "cm". The program replies with the ratio of inches to centimetres, and of centimetres to inches.