Symbian3/SDK/Source/GUID-FCE138BF-A471-5864-AE4C-8D89EF5F2BB9.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 16 Jul 2010 17:23:46 +0100
changeset 12 80ef3a206772
parent 0 89d6a7a84779
permissions -rw-r--r--
Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-FCE138BF-A471-5864-AE4C-8D89EF5F2BB9" xml:lang="en"><title>Symbian
Emulator target using Metrowerks CodeWarrior</title><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>This page describes how to build for the Symbian emulator using the Metrowerks
CodeWarrior compiler. The Symbian emulator is also known as the WINSCW build
target. </p>
<section><title>Building from the command line</title> <p>To build for WINSCW,
with <filepath>abld</filepath> use: </p> <p><userinput>bldmake bldfiles</userinput> </p> <p><userinput>abld
build winscw [udeb | urel]</userinput> </p> <p>Binaries are generated in the <filepath>udeb</filepath> and/or <filepath>urel</filepath> sub-directories
of the <filepath>epoc32\release\winscw\</filepath> directory. </p> </section>
<section><title>Building from the CodeWarrior IDE</title> <p>You can build
applications for a WINSCW Symbian 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. </p> <p>The
simplest way to use CodeWarrior, is, after defining a <filepath>bld.inf</filepath> file
and a <filepath>.mmp</filepath> file, choose the <systemoutput>File      
    | Import project from .mmp file</systemoutput> command. CodeWarrior then
reads the <filepath>.mmp</filepath> 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. </p> <p>If later you change the <filepath>.mmp</filepath> 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 <filepath>.mmp</filepath> file, but it is
good practice to manually keep the <filepath>.mmp</filepath> file up to date
with any changes made. </p> <p>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. </p><p><b>Alternative method </b> </p> <p>A
slightly longer method is available that creates a CodeWarrior IDE project
from the command line. To do this, run <codeph>bldmake bldfiles</codeph> as
described, and then, to generate a CodeWarrior IDE project, use: </p> <p><userinput>abld
makefile CW_IDE</userinput> </p> <p>This creates an importable project file <varname>project-name</varname> <filepath>.xml</filepath> in
the directory <filepath>&lt;path&gt;\epoc32\build\</filepath> <varname>absolute_path_to_mmp_file</varname> <filepath>\</filepath> <varname>mmp_basename</varname> <filepath>\winscw\</filepath>. </p> <p>You can now tell CodeWarrior to read
this file and from it generate a project file of its own native type (an <filepath>.mcp</filepath> file).
Start CodeWarrior, choose the <systemoutput>File | Import Project...</systemoutput> command,
select the <filepath>HelloWorld.xml</filepath> file, and choose a name for
the CodeWarrior project (such as <filepath>HelloWorld</filepath> again). CodeWarrior
will now generate and load the project, which you can build, run, debug, etc.
using the normal IDE commands. </p> </section>
</conbody></concept>