Developing for Symbian

Getting started with the first project on my Nokia N73 was not as easy as it should have been in my opinion,
as making a simple Hello world app makes you go throw a lot of files saved in different places, you’ve got to
figure out how to modify some information so that you are able to build your application.

1.Install the tools

First thing to do is to install all the required tools:

-S60 Platform SDK for Symbian OS
-ActivePerl 5.6.1.x
-Carbide.c++

-and to manage the files on the phone from the pc you can install Nokia PC Suite, I’ve inserted an SD-card in my Nokia N73
and there I copied the sisx file (nokia installer), in order to deploy my application’s installer on the phone.

Here is a link where you have all the information about this:

http://www.forum.nokia.com/document/Cpp_Developers_Library/?content=GUID-232258EC-D3B4-4D72-B12B-FFC34F070B4B_GUID-9615092A-9FA2-4F4E-859F-A231A3919FC9.html

2.Create the first HelloWorld application

Next step is to start with a simple HelloWorld application. For this run Carbide, select the working directory,
then go to File->New Project select Symbian OS C++ project next 3rd-Future Ed. GUI Application, next type the name
of the application, next select the SDKs and Buil Configurations, you can select them all then latter you can choose
the active one you need, next give a random UID for the App UID field, fill the other fields also, then tap next and finnish.

In the left side you’ll have the Project Explorer with all the projects present in the working directory,
expand the current one and you can start writing code. The currently created code is not working though, you’ll have
to make some changes first.

Choose the platform you want to develop for, go to Project->Build Configurations->Set Active and select:
Emulator Debug(WINSCW) for the emulator, or Phone Release(GCCE) for device(you can also select for the ARMV5).
Right click->Build Project on your project name(in project explorer) to build your application. You can see some errors,
this is because the pkg file has to be modified, you can find it in the sis directory.

3.How to modify the pkg file

The pkg file is the package file that is used to create the *.sis file that can be installed to the phone.
If you open the pkg file you’ll see some paths like:
“$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\…
you need to change the source paths to match the place where Carbide created those files. You can set absolute paths there
like c:\Symbian…, but it’s more practical to set the EPOCROOT variable, that will be common for all of your projects.
For this open a cmd prompt(it’s not important in which directory)
and write the command: “set EPOCROOT” to first check the value for the EPOCROOT, if the path is correct meaning
that you can find the Epoc32 directory there, then it is ok, you can leave it like that(it must be somethig like:
(\Symbian\9.1\S60_3rd_MR\ , without the drive letter, and ending with \), otherwise you’ll have to set it
correctly with the following command: “set EPOCROOT=\Symbian\9.1\S60_3rd_MR\” (without the drive letter “c:”).
Now you must have the right value for EPOCROOT, and use it in the pkg file. You can do the same for the $(PLATFORM) and $(TARGET), but
I’ve replaced them with specific directories as once I changed them they were set back to there default value, for some
reason I didn’t manage to do that, if you find out why you are welcome to post a comment on this.

To keep the path settings, you can place the ‘set EPOCROOT= …’ command inside c:\autoexec.bat, to be executed each time your PC starts,
or you can configure the PATHS by right clicking my computer -> properties -> advanced -> environment variables.

So in the end the paths must look something like this:

;Files to install
;You should change the source paths to match that of your environment
;
“$(EPOCROOT)Epoc32\release\gcce\urel\test5_0xEC4573B9.exe” -“c:\sys\bin\test5_0xEC4573B9.exe”
“$(EPOCROOT)Epoc32\data\z\resource\apps\test5_0xEC4573B9.rsc” -“c:\resource\apps\test5_0xEC4573B9.rsc”
“$(EPOCROOT)Epoc32\data\z\private\10003a3f\apps\test5_0xEC4573B9_reg.rsc” -“c:\private\10003a3f\import\apps\test5_0xEC4573B9_reg.rsc”
“$(EPOCROOT)Epoc32\data\z\resource\apps\test5_0xEC4573B9.mif” -“c:\resource\apps\test5_0xEC4573B9.mif”
“..\help\test5_0xEC4573B9.hlp” -“c:\resource\help\test5_0xEC4573B9.hlp”
“$(EPOCROOT)Epoc32\Data\z\resource\apps\test5.mbm” -“c:\resource\apps\test5.mbm”

you’ll have to check the paths to be correct, you must be able to locate the exe, rsc, mif…files there, if not search for them
and add the correct paths. One thing you have to consider is the platform you have chosen at step 2:
gcce, armv5 is for device, winscw is for emulator, udeb is for debug, urel is for release, so use the correct directories.
Eg:
if you’ve selected the platform for the device Phone Release(GCCE) you’ll find the exe file in
$(EPOCROOT)Epoc32\release\gcce\urel\,

if you’ve selected the platform for the emulator Emulator Debug(WINSCW) you’ll find the exe file in
$(EPOCROOT)Epoc32\release\winscw\udeb\,

4. Create the sis, sisx files

At this point you can rebuild you application, and the sis and sisx(signed sis) files must be created in the
sis directory of your project. Sometimes if they are not created you must specifically set this option from:
Project->Properties open Carbide c++ and select
Carbide Build Configuration then go to SIS builder tab and add the pkg file,
check the create self signed sis file, apply the settings and this is it,
now the sis and the sisx files will be created.

5. Install the application on the device or emulator

5.1 If you’ve made the build for the phone then you are done, just copy the sisx file on the phone. I’ve inserted an
sd card and copied my sisx file there. Go to Menu->Tools->File mgr at second tab (using right dpad) and install it.
You’ll find the application installed in Menu->Applications on your device.

5.2 If you want to run the installer on the emulator there are some problems that you’ll encounter.
First copy for eg. the sisx file to:
c:\Symbian\9.1\S60_3rd_MR\Epoc32\winscw\c\Data\Installs
on your pc, then you should find it in
Menu->Organizer->File Mgr->Installed Files
on the emulator.

But running it you’ll get the File corrupted error message so you need to install this for the certificates:
http://wiki.forum.nokia.com/images/a/a6/Certstore_S60_3rd_SDK.zip
unzip the file and copy it to the epoc32…(corresponding directory)

This does not solve the problem either cause you will get:
“Unable to install. Component is built-in.”. The “built-in” error message
To solve this use “abld reallyclean” command to clean the project, if this doesn’t help then delete the files manually
, go to the location where your SDK is installed(c:\Symbian) and search for all files containing your project’s name
(eg: my project is named test5 so I search for test5 and delete all files, the files that can’t be deleted I rename them to something else)

Having all this information you should be able to install your application on device or emulator.
Next article I’ll present how to display an image, draw shapes, etc.

By Meda Chiorean

This article has 4 Comments

  1. Hi there, I found this post to be very helpful.

    I would like to develop software in South Africa that will help people create trusts over their cellphones.

    I would also like to create software for cellphones that will allow for efficient VoIP calls.

    Would you be able to assist?

  2. The resource is very helpfull fro new developers. I am also get help from that. Thanks for the resource..

  3. I new ppl abt this. But modify my n73 sound great. So i want ask, wat app we using for dat

  4. Hello,

    Thanks all for your appreciation!

    Musa I am at a starting point with the development for Symbian, but feel free to post your findings and your questions here and if I’ll be able to help you I will.

    Muhammad, I’m glad to see that I could help new Symbian developers to get through the taught starting point, as I also had some difficulties with finding complete information for a beginner in symbian programming.

    Ascorpi can you please rephrase?

Leave a Reply