|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-FCE138BF-A471-5864-AE4C-8D89EF5F2BB9" xml:lang="en"><title>Symbian |
|
13 Emulator target using Metrowerks CodeWarrior</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <p>This page describes how to build for the Symbian emulator using the Metrowerks |
|
15 CodeWarrior compiler. The Symbian emulator is also known as the WINSCW build |
|
16 target. </p> |
|
17 <section><title>Building from the command line</title> <p>To build for WINSCW, |
|
18 with <filepath>abld</filepath> use: </p> <p><userinput>bldmake bldfiles</userinput> </p> <p><userinput>abld |
|
19 build winscw [udeb | urel]</userinput> </p> <p>Binaries are generated in the <filepath>udeb</filepath> and/or <filepath>urel</filepath> sub-directories |
|
20 of the <filepath>epoc32\release\winscw\</filepath> directory. </p> </section> |
|
21 <section><title>Building from the CodeWarrior IDE</title> <p>You can build |
|
22 applications for a WINSCW Symbian emulator using the CodeWarrior compiler |
|
23 from the CodeWarrior IDE. You can also build for ARM targets from the IDE: |
|
24 this invokes the native toolchain, rather than CodeWarrior's own compiler. </p> <p>The |
|
25 simplest way to use CodeWarrior, is, after defining a <filepath>bld.inf</filepath> file |
|
26 and a <filepath>.mmp</filepath> file, choose the <systemoutput>File |
|
27 | Import project from .mmp file</systemoutput> command. CodeWarrior then |
|
28 reads the <filepath>.mmp</filepath> file that you select, and generates and |
|
29 opens a CodeWarrior project. You can then use the normal CodeWarrior commands |
|
30 to run, build, and debug the project. </p> <p>If later you change the <filepath>.mmp</filepath> file, |
|
31 you can use the same commands to regenerate the IDE workspace. Changes you |
|
32 make to the project made through the IDE, such as adding a source file, are |
|
33 not automatically written to the <filepath>.mmp</filepath> file, but it is |
|
34 good practice to manually keep the <filepath>.mmp</filepath> file up to date |
|
35 with any changes made. </p> <p>The IDE project files have special build steps |
|
36 which invoke the resource compiler, so for projects that use resources, this |
|
37 does not need to be run separately. </p><p><b>Alternative method </b> </p> <p>A |
|
38 slightly longer method is available that creates a CodeWarrior IDE project |
|
39 from the command line. To do this, run <codeph>bldmake bldfiles</codeph> as |
|
40 described, and then, to generate a CodeWarrior IDE project, use: </p> <p><userinput>abld |
|
41 makefile CW_IDE</userinput> </p> <p>This creates an importable project file <varname>project-name</varname> <filepath>.xml</filepath> in |
|
42 the directory <filepath><path>\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 |
|
43 this file and from it generate a project file of its own native type (an <filepath>.mcp</filepath> file). |
|
44 Start CodeWarrior, choose the <systemoutput>File | Import Project...</systemoutput> command, |
|
45 select the <filepath>HelloWorld.xml</filepath> file, and choose a name for |
|
46 the CodeWarrior project (such as <filepath>HelloWorld</filepath> again). CodeWarrior |
|
47 will now generate and load the project, which you can build, run, debug, etc. |
|
48 using the normal IDE commands. </p> </section> |
|
49 </conbody></concept> |