Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Emulator target using Metrowerks CodeWarrior

This page describes how to build for the emulator using the Metrowerks CodeWarrior compiler. The emulator is also known as the WINSCW build target.


Building from the command line

To build for WINSCW, with abld use:

> bldmake bldfiles

> abld build winscw [udeb | urel]

Binaries are generated in the udeb and/or urel sub-directories of the epoc32\release\winscw\ directory.

[Top]


Building from the CodeWarrior IDE

You can build applications for a WINSCW emulator using the CodeWarrior compiler from the CodeWarrior IDE. You can also build for ARM targets from the IDE: this invokes the native toolchain, rather than CodeWarrior's own compiler. The CodeWarrior documentation describes in full how to use CodeWarrior with Symbian OS in its Targeting Symbian OS online manual, but a brief summary follows.

The simplest way to use CodeWarrior, is, after defining a bld.inf file and a .mmp file, choose the File | Import project from .mmp file command. CodeWarrior then reads the .mmp file that you select, and generates and opens a CodeWarrior project. You can then use the normal CodeWarrior commands to run, build, and debug the project.

If later you change the .mmp file, you can use the same commands to regenerate the IDE workspace. Changes you make to the project made through the IDE, such as adding a source file, are not automatically written to the .mmp file, but it is good practice to manually keep the .mmp file up to date with any changes made.

The IDE project files have special build steps which invoke the resource compiler, so for projects that use resources, this does not need to be run separately.

Alternative method

A slightly longer method is available that creates a CodeWarrior IDE project from the command line. To do this, run bldmake bldfiles as described, and then, to generate a CodeWarrior IDE project, use:

> abld makefile CW_IDE

This creates an importable project file project-name.xml in the directory <path>\epoc32\build\absolute_path_to_mmp_file\mmp_basename \winscw\.

You can now tell CodeWarrior to read this file and from it generate a project file of its own native type (an .mcp file). Start CodeWarrior, choose the File | Import Project... command, select the HelloWorld.xml file, and choose a name for the CodeWarrior project (such as HelloWorld again). CodeWarrior will now generate and load the project, which you can build, run, debug, etc. using the normal IDE commands.