Qt Quick Start
From Symbian Developer Community
This Quick Start is relevant if you want to create Qt applications for the Symbian platform. It assumes you are using the free GCCE compiler and does not cover rebuilding Qt itself.
The tutorial shows you how to set up your Qt for the Symbian platform v4.6.1 development environment on a Windows computer, build an example command line application, and deploy the Qt binaries and demos to your Symbian mobile device.
On completion, developers should read Qt Carbide.c++ IDE Quick Start (or Qt Creator with the Symbian Platform) to configure the IDE.
Contents |
Process Overview
Setting up a Windows developer environment for Qt on the Symbian platform has five parts:
- Set up Symbian C++ development environment
- Update Symbian C++ Development Environment with Open C/C++ v1.6 and other patches required by Qt
- Install Qt, layering over the top of selected SDKs
- Configure the command line for Qt development
- Deploy Qt binaries and Open C/Open C++ to the device.
| Note At time of writing, Symbian platform development in C++ is only supported on Windows. The developer community has provided workarounds that should allow you to develop for Symbian on Linux and Mac OS X. Information is provided at the following links:
|
Symbian C++ Development Environment
Assuming your computer meets the standard system requirements, setting up your Windows PC for Symbian platform C++ development is as simple as downloading and installing the following files (in order):
- Perl. See the Kits Q&As for notes on the recommended version.
- Application Developer Toolkit (ADT) (includes Carbide.c++ IDE)
- Symbian Platform SDK or S60 Platform SDK (3rd Edition FP1 or higher) (all include GCCE compiler)
| Note Windows Vista users:
|
Patch Symbian C++ Development Environment
Open C and Open C++
Qt is dependent on the Open C and Open C++ compatibility layer, version 1.6.0 or higher. At time of writing, no Symbian C++ SDKs (up to at least Symbian^1) contain a version that will work with Qt. Therefore the patch must be installed over all SDKs you want to use for Qt development:
- Download the latest OpenC plugin SDK
- Unzip the installation file and run the contained setup.exe
- When prompted, select the target SDK over which you wish to install the plugin. Repeat steps 2 and 3 instructions for each SDK.
If you're working on a S60 3rd Edition, FP1 SDK (the earliest version on which Qt will run) you will also need to reinstall the RPipe library. This was installed by the OpenC plugin SDK to the S60_3rd_FP1_3 SDK root directory: \Symbian\9.2\S60_3rd_FP1_3\RPipe_3.1.zip:
- Uncompress RPipe_3.1.zip over the SDK root \Epoc32\ tree (e.g. \Symbian\9.2\S60_3rd_FP1_3\Epoc32\).
- Download and replace the file <SDK>\epoc32\tools\getexports.exe with getexports.exe
Carbide Windows Compiler
If you're using the version of Carbide.c++ in ADT 1.4 you will need to update to a newer version of Carbide.c++, or apply the following patch. Extract the file into the \x86Build directory under your Carbide installation, e.g. C:\Symbian\Tools\ADT_1.4\Carbide.c++\x86Build\
- x86Tools_3.2.5_Symbian_b487.zip - windows compiler patch
If you're using any other version of Carbide, you can check the compiler version by executing mwccsym2.exe from the command line as shown below. The Carbide compiler needs to be be at least version 3.2.5, build 487 to be able to build Qt properly.
C:\Symbian\Tools\ADT_1.4\Carbide.c++\x86Build\Symbian_Tools\Command_Line_Tools\mwccsym2.exe
The new version of the compiler is expected to be in ADT v1.5 (and later).
Qt Development Environment
Download and install the Qt for Open Source C++ development on Symbian installer file below. Qt must be installed on the same drive as your target SDK(s), and the install path must not contain any spaces. When prompted, specify the S60 5th Edition SDK (Symbian^1) and any other SDKs which you wish to use with Qt.
| Note The downloaded Qt installer is licensed under LPGL. To use a commercial (or other) license see this page: http://qt.nokia.com/downloads |
Configure Command Line
The ADT environment must be configured to allow command line building for the Symbian platform emulator. Using the Windows start button:
- All Programs | Symbian Foundation ADT v1.4 | Carbide.c++ | Configure environment for WINSCW command line
You can alternatively set the following environment variable:
SYMBIANBUILD_DEPENDENCYOFF=1
| Note The Qt installer provides a command prompt that has already been configured with the correct paths for Qt development; if you use the command prompt then no other setup is required. This is accessed from the Windows start button: All Programs | Qt for Symbian by Nokia v4.6.1 | Qt for Symbian Command Prompt If you want to use Qt from any command prompt then you will need to update the PATH environment variable to locate the Qt tools: qmake, moc, etc.
|
Build an Example Application
Open the command prompt provided in the Windows start button: All Programs | Qt for Symbian by Nokia v4.6.1 | Qt for Symbian Command Prompt and navigate to your target project. For this example, we will build the animatedtiles example code that comes with the Qt installation: C:\Qt\4.6.1\examples\animation\animatedtiles\.
Run qmake to generate the Symbian specific bld.inf and .mmp files:
qmake
Use make debug-winscw to build emulator debug binaries and make run to launch the application in the emulator:
make debug-winscw
make run
| Note If multiple SDKs(devices) are installed on the system, make the current working SDK(device) as the default device using devices command (e.g. C:\>devices). Otherwise, there make command may not work properly. |
Use make release-gcce to build release binaries for the device. After building the binaries make sis is called to create an unsigned installation file. This file can be installed and run on the device after Qt has been deployed.
make release-gcce
make sis
There are also make targets for the RVCT compiler (debug-armv5 and release-armv5). The release-winscw target exists, but cannot be used because release emulator binaries aren't supplied with the SDKs.
The sis file created above is self-signed. There are a number of other SIS options that can be set as environment variables or options to make - these are documented in The Symbian platform - Introduction to Qt. For example, if you want to install the program immediately, make sure that the device is connected to the computer in "PC Suite" mode, and run sis target with the QT_SIS_OPTIONS=-i, like this:
make sis QT_SIS_OPTIONS=-i
Deploy Qt to a Device
The easiest way to deploy Qt to your device is to install the qt_installer.sis or qt_demos.sis installation files that were copied with Qt onto your windows computer (into the Qt "root", by default at the location: C:\Qt\4.6.1\). These contain the Qt libraries and its dependencies (Open C and Open C++). The qt_demos.sis additionally contains the fluidlauncher demo applications - these provide an excellent example of Qt's capabilities on the mobile device.
The Qt installation also provides qt.sis (Qt binaries only - depends on Open C/C++), qt_selfsigned.sis (a self-signed version of qt.sis), and fluidlauncher.sis (Depends on Qt and Open C) that may be useful in some packaging circumstances. If you need standalone versions of the three Open C/C++ installation files, these are located in your Symbian SDK at the following path below the EPOCROOT (the location where your SDK was installed):
- <EPOCROOT>\nokia_plugin\openc\s60opencsis\pips_s60_<version>.sis
- <EPOCROOT>\nokia_plugin\openc\s60opencsis\openc_ssl_s60_<version>.sis
- <EPOCROOT>\nokia_plugin\opencpp\s60opencppsis\stdcpp_s60_<version>.sis
| Tip At time of writing, none of the SIS files are signed with a certificate for Samsung phones. Samsung i8910/Omnia HD owners should instead install the above Open C/Open C files and qt_selfsigned.sis. |
Troubleshooting
The vast majority of users will have followed the above instructions without issue, and have now built an example on the command line without difficulty.
If you do encounter development environment issues, then you should:
- Test that your development environment is set up correctly
- Follow the Development Environment Troubleshooting Guide
- Review the Qt Known Issues (on Gitorious).
Summary
This tutorial showed how to set up a Qt development environment on a windows computer, build an example command line application, and deploy the Qt binaries and demos to your Symbian mobile device.
Developers should next set up their IDE for Qt development, as discussed in Qt Carbide.c++ IDE Quick Start (or Qt Creator with the Symbian Platform).
Related Information
Further reading:
- Qt Technical Overview
- Qt Q&As
- Qt Reference Documentation (recommended)
- Qt Developer's Library (Forum Nokia)
- Qt on Samsung Symbian Part 1 and Part 2
- A Video Guide for Setting up Qt development environment for Symbian
About the Kits:
- What are the Kits? explains the ADT and SDK.
- Kits Q&As
- Debugging on the Device Quick Start
- Symbian^1 SDK Release Notes
- Symbian^1 SDK Installation Guide
| © 2009 Nokia Corporation and/or its subsidiary(-ies). This document is licensed under the Creative Commons Attribution-Share Alike 2.5 license. See http://creativecommons.org/licenses/by-sa/2.5/legalcode for the full terms of the license. |
Comments
Contents |
Meshashiranjan said…
Danhicksbyron said…
Could use a "Quick ReStart" equivalent -- how to reload all or part of the environment, and a brief outline of which parts load what, and which parts must be installed in sequence.
--Danhicksbyron 16:54, 1 February 2010 (UTC)
Apb2973 said…
Yeah, good help, but im still getting problems, will post on forum for some help. On running qmake from command prompt, i get Setting up environment for Qt usage
C:\Qt\4.6.1>qmake Failed to determine epoc root. Either set EPOCROOT or EPOCDEVICE environment variable to a valid value, or prov ide a default Symbian device.
When i try devices , it says 'no devices are currently installed What am i missing ??
--Apb2973 17:10, 13 February 2010 (UTC)
Smelkote said…
Hi Apb2973,
The issue u are facing could be because, active perl was installed after the sdk was installed and the "devices" variable wasn't set at all. No devices currently installed indicated u haven't set a default symbian sdk have u installed any sdk in the first place?.. if so, was perl already installed before the sdk installation was done so that while the sdk installation goes through, the required settings are effected
--Smelkote 00:14, 17 February 2010 (UTC)
Sign in to comment…





Very nice article. It really helped me to get started quickly. Thanks a lot :-)
--Meshashiranjan 07:31, 31 January 2010 (UTC)