# 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 for testing.

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 all 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. There is however a description of the Hello World program code in Understanding the Hello World application.

## The Win32 toolchain

This plug-in will work with the Microsoft Visual Studio 6/.NET/.NET 2003 packages but you can have a free toolchain based on Microsoft Visual C++ Toolkit (this toolkit contains the same C++ compiler as in Visual Studio .NET 2003 but without the graphics IDE - only the command line compiler). It can be downloaded from here. There is one component missing in this package - the `nmake` program. It can be downloaded in the .NET Framework 1.1 SDK here. The documentation of the older versions of this plug-in would tell you to download the Microsoft Platofrm SDK for the `dumpbin.exe` but it is not needed in this version.

The plug-in will also detect the Borland C++Builder but it won't work "out of the box". To make it work check a user comment on NewLC. Note that C++Builder can be used with SDKs for C++Builder. I know only one such SDK - Series 60 v1.2 SDK for Borland. Most of the SDKs are for C++BuilderX which uses the Visual C++ toolchain, just like this plug-in.

The plug-in will also detect CodeWarrior compiler and a user reported that it works with this compiler.

## 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. Note: There are several types of SDKs for different compilers. The MS&Borland version will work with Visual C++ Toolkit/Visual Studio
- Series 80 v2.0 SDKs from Forum Nokia. Note: There are several types of SDKs for different compilers. The version without the CodeWarrior word will work with Visual C++ Toolkit/Visual Studio
- Series 90 SDKs from Forum Nokia. Note: There are several types of SDKs for different compilers. The Microsoft&Borland version will work with Visual C++ Toolkit/Visual Studio
- UIQ SDK from SonyEricsson. Note: 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 as described above, 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 there are problems with it) and CodeWarrior.

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).