03.01.2013 Views

Chapter 1

Chapter 1

Chapter 1

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Nao previously worked on GPS car navigation for six years and has a Master's degree in<br />

Software Engineering from Toyohashi University of Technology, Japan.<br />

Acknowledgements<br />

Eagle-eyed readers will observe that Symbian OS C++ for Mobile Phones resembles one of<br />

its predecessors, Professional Symbian Programming, published in February 2000. Symbian<br />

OS has evolved a great deal since Professional Symbian Programming was written, but the<br />

previous publication served as an excellent framework for the new book. Therefore, the<br />

current authors owe a debt of gratitude to the original writers – lead author Martin Tasker<br />

and his team. Thanks also to the Laughing Gravy for providing vital fuel to us all. Cover<br />

design by Jonathan Tastard.<br />

Symbian licenses, develops and supports Symbian OS, the platform for next-generation<br />

data-enabled mobile phones. Symbian is headquartered in London, with offices worldwide.<br />

For more information see the Symbian website, http://www.symbian.com/. 'Symbian',<br />

'Symbian OS' and other associated Symbian marks are all trademarks of Symbian Ltd.<br />

Symbian acknowledges the trademark rights of all third parties © Copyright Symbian Ltd<br />

2002. All rights�referred to in this material. reserved. No part of this material may be<br />

reproduced without the express written permission of Symbian Ltd.<br />

<strong>Chapter</strong> 1: Getting Started<br />

Overview<br />

It seems to be traditional to start a book on computer programming with a 'Hello World'<br />

example and, although this is a book that is more about an operating system (OS) than a<br />

programming language, I'll follow that tradition. In the process I'll introduce you to the<br />

emulator, and to the tools for building C++ programs, so that by the end of the chapter you<br />

will have found out the basic information on how to build and run a Symbian OS application.<br />

I won't get too involved in describing Symbian OS programming conventions, application<br />

programming interface (API) functions, and so forth. Instead, I'll concentrate on the tools you<br />

need, and how to use them, leaving the more specific details until later chapters.<br />

First, I'll briefly describe the emulator. Most Symbian OS software is developed first on the<br />

emulator and only then on real target hardware. The emulator also includes a number of<br />

Symbian OS applications, and so mimics a real Symbian OS phone very closely. You will<br />

need to get familiar with the emulator and, while doing so, we can use the opportunity to take<br />

a look at the applications and some of the distinctive features of UIQ, one of the various<br />

graphical user interfaces (GUIs) used by Symbian OS.<br />

Then we'll create a program. The easiest things to build are text- mode console programs,<br />

so that's the form of the classic 'Hello World' application that we'll use. I'll demonstrate how<br />

to compile it for either the emulator or a target Symbian OS mobile phone, and how to<br />

launch and debug it using the Metrowerks CodeWarrior IDE.<br />

1.1 Using the Emulator<br />

The emulator is a fundamental tool for all the Symbian OS SDKs, so it's vital that you get to<br />

know it and learn how to use it.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!