# Getting started

Programs for Symbian OS are written on Windows NT/2000/XP/2003 (the SDKs are not fully tested under newer Windows version but I had no problems under Windows XP) and run on the PC in an emulator. From time to time you can build a version to be loaded into the phone.

To write C++ programs for Symbian OS you will need a Symbian SDK and a C++ compiler for the Windows 32-bit platform ("Win32"). The Win32 compiler will be used to create the application for the emulator (an ARM cross-compiler to compile for the phone is included in the SDK). The compiler and the emulator will be described below.

Symbian programs are written in C++ but uses many Symbian OS-specific conventions. The most important conventions are described in the "Symbian C++" chapters.

In this short help I won't describe the Symbian OS classes/methods. They are documented (at least some of them are) in the help supplied with the SDKs. To read them click a file from a Symbian OS project in the tree in the left pane and then select Project > Symbian SDK Help.

## The Win32 toolchain

You can have a free Win32 build environment based on Microsoft Visual C++ Toolkit by proceeding as described here. The Platform SDK is enormous but I think the only thing you need is the Build environment (64-bits) from the Core SDK for Windows Server for the `dumpbin.exe` program located in it. You don't need to setup the `PATH`. The plug-in will take care of it.

The plug-in also works with the Visual Studio suite. (the Borland C++Builder will be detected but won't work because `ABLD` could not locate the `c0epocd.obj` which is located in <root-dir>\lib. I don't know how to setup this. That's not a big problem as there is only one Series 60 1.2 SDK for C++Builder. Others are for C++BuilderX which uses the Visual C++ toolchain, like this plug-in).

## The Symbian SDKs

The SDKs can be downloaded from the phone manufacturers sites. There are different SDKs for different platforms (see "Getting Started" for details), different platform versions and different Win32 compilers. You should download the version that corresponds to your phone (don't think that a higher version of an SDK is better - a higher version might produce programs that your phone won't be able to understand). A discusion about Series 60 SDKs can be found here.

### Links:

- Series 60 SDKs from Forum Nokia. The MS&Borland version will work with Visual C++ Toolkit/Visual Studio
- Series 80 v2.0 SDKs from Forum Nokia. The version without the CodeWarrior word will work with Visual C++ Toolkit/Visual Studio
- Series 90 SDKs from Forum Nokia. The Microsoft&Borland version will work with Visual C++ Toolkit/Visual Studio
- UIQ SDK from SonyEricsson. The "wins version" SDK will work with Visual C++ Toolkit/Visual Studio

## Checking the setup

Go to Window > Preferences > Symbian OS Development > Win32 Tools. If if you have one of the compilers listed below it will be autodetected by the plug-in. The plug-in detects the Visual C++ Toolkit with the .NET SDK and Platform SDK as described in the mentioned article, Visual Studio 6.0/.NET 2002/.NET 2003 (Visual Studio 2005 should also be detected but it probably won't work), Borland C++Builder 5, 6, and X (but as mentioned C++Builder doesn't work) and CoreWarrior.

If you compiler is not listed you should configure it manually - select "Add..." put the paths that should be added to the PATH variable to make it work and choose the ABLD target (wins for Visual C++, winsb for Borland C++Builder and winscw for CodeWarrior).

Go to Window > Preferences > Symbian OS Development > Symbian SDKs and check if the plug-in detected the SDKs. If you have more than one Win32 compiler, you can set a default compiler for a given SDK in that window.

If you have at least one compiler and one SDK you can create Symbian OS projects

## The Hello World Program

Go to File > New > Project > C++ > Symbian OS. In the next page of the wizard enter the eclipse project name. On the third page you choose the SDK and compiler (you can later change these settings) and a template. For the first project depending on the platform choose the Basic series 60 application or Basic UIQ application template. This will create the HelloWorld application. On the last wizard's page enter the Symbian project name - this string will be used to genereate the names of the classes, application installation directory etc., so it shouldn't contain spaces. If you don't want to use a development UID you can change it here.

If your program compiled without errors you can start the emulator. Choose Run > Run... Choose Symbian and choose new. There you should configure the project name. Choose your project. You can also choose a skin for the emulator. However note that the skin only changes the bitmap shown by the emulator. For the APIs to behave similarly to the phone APIs use the correct SDK. After configuring choose Run. Your application should be avaible from the launcher menu in the emulator. After the first successful run you can run the last configuration with Ctrl+F11.

Note that in the SDK documentation it is written that the emulator should be started by the Administrator. After the installation the emulator won't start for other users. To make it start for another user give that user Full Access rights for the SDK directory (probably it is enough to give rights for only a specific subdirectory, but I never searched which). The emulator will start but I don't know if all the features will work (e.g. Bluetooth support or some other hardware-accessing features might not work).