Nokia N97 SDK Example Applications Guide |
Redirect stdio to a file
1. About this Example
2. Prerequisites
3. Design and Implementation
This example illustrates how to redirect stdio to a file. libc library provides freopen API to redirect all standard IOs (namely,
stderr, stdin, or stdout). Application first printf launching information at console and then open one file to redirect stdout
using freopen. Calling freopen once more, user can change the filename during execution. This helps lot to redirect application
printf messages into a log file.
This example requires a familiarity with POSIX standard C APIs, and access to Open C documentation.
The program capabilities are defined in redirectprintf.mmp file: CAPABILITY NONE.
The application is simple console based application. It has its own default icon and can be launched from the UI both in the
emulator and in the device.
The application can be launched by:
- Executing redirectprintf from eshell.
- Clicking default icon with display text redirectprintf within the install folder launcher application.
|
© Nokia 2009
|

|