How to configure Qt and Qt Mobility for Symbian SDK

Bitbar, the mobile devops company. Logo, large

Qt allows you to code once and deploy your application to many types of mobile devices. Obviously you still need to #ifdef in some places in your code. In the mobile world the general targets for Qt are Symbian/S60, Maemo, MeeGo and Windows Mobile devices. There are also APIs know as Qt Mobility which enable developers to add mobile functionality to their applications, like phone contact lis, camera, sensors, multimedia etc.

Qt Creator
In this blog post I show how to setup developers environment for Symbian, exacly for S60 5th SDK. To do this we need four things:

Install the Symbian SDK first ( the version of ActivePerl required for this SDK is available here) and OpenC++ plugin after that. Then install Qt libraries, during this installation you should select SDKs for which Qt will be used, so select the S60 5th one.
Get Qt mobility and extract it to C:QtMobilityC:QtMobility%DISTNAME%). The biggest problem is the Qt Mobility installation, as you can read in this project documentation you only need to do that:

cd c:QtMobility%DISTNAME%

Unfortunately, it usually ends up wrong and prevents development, so I recommend to do it manualy:

Extract packages (it is in C:QtMobility%DISTNAME%) into the root directory of the S60 SDK. From the Qt Mobility archive copy /features/mobility.prf.template to path /mkspecs/features/mobility.prf in your Symbian SDK folder. Remember to repeat this step for all the Symbian SDKs which you selected during Qt installation.

Affter all of these steps you are going to have ready development enviroment for Symbian devices. To make a release build and SIS package for a device run in your project directory:

make release-gcce
make sis

If you want to use the emulator, you must configure the environment: the best way is to install Nokia qt sdk and upgrade them following the description on The Forum Nokia. To make a debug build for the emulator run in your project directory:

make debug-winscw

Using the emulator with QTestLib framework can be a very simple way for automated testing of the application in the continuous integration process.