next up previous
Next: File Transfer Up: Developing for the Symbian Previous: Developing for the Symbian

The Software Development Kit

To program for the Symbian OS you will need to get the Windows-based Symbian OS Software Development Kit[*](SDK) for the specific phone you are developing for[*], which can be downloaded freely from the mobile phone companies homepages. The SDK consists of a tool-chain that allows you to build for various platforms with the same source files. The supported targets are the mobile phone and the windows-based emulator. The actual compilation is done with GNU GCC for the mobile phone, and a Windows compiler (Microsoft Visual C++ or Metrowerks CodeWarrior) for the emulator.

Since my normal working environment is Linux, I chose to find a way to make the SDK work with this. There are two ways to make it work: The GnuPoc project[*]and sdk2unix[*]. They are both a collection of patches and utilities that are applied to the official SDK, to make it work with Linux. They both consist of patches to solve case- and path-problems, but take two different approaches to the actual build process. GnuPoc makes the SDK work the same way with Linux as it does with Windows, using Symbian's own build-tools. sdk2unix makes the SDK behave more like a traditional Unix tool-chain, by supplying a set of GNU Make-rules that allows usage of standard Makefiles.

I have successfully used both GnuPoc[*] and sdk2unix with the Nokia 7650, but have only managed to get sdk2unix to work with the Sony Ericsson P800. For that reason I have chosen to use sdk2unix, which is also for me to use since it is traditional Unix style. Here is an example of a typical Makefile for sdk2unix:

ARCH=p800
EPOC=/usr/local/symbian/7.0

LIBS=   $(EPOCTRGREL)/euser.lib \
        $(EPOCTRGREL)/apparc.lib \
        $(EPOCTRGREL)/cone.lib \
        $(EPOCTRGREL)/eikcore.lib \
        $(EPOCTRGREL)/eikcoctl.lib \

NAME=btecho
OBJECTS=btecho.o btechoapplication.o messageserver.o \
        btechoappview.o btechodocument.o btechoappui.o 
TARGET=$(NAME).app
MAJOR=1
MINOR=0
PKGVERS=$(MAJOR),$(MINOR)

PKGFILES=$(NAME).app $(NAME).rsc

U1 = 1000007a
U2 = 100039ce
U3 = 10BE5C34

CFLAGS = -O -I. -I$(EPOC)/include/libc -DUID3=0x$(U3) \
         -DDEBUG -DARCH_${ARCH}
CPPFLAGS += -DARCH_${ARCH}

all:$(PKGFILES) $(NAME).sis
    mv $(NAME).sis $(NAME)-$(MAJOR).$(MINOR)-$(ARCH).sis
$(TARGET):$(OBJECTS)

$(NAME).o: $(NAME).rsc $(NAME).h

clean:
      rm -f $(GENERATED)


next up previous
Next: File Transfer Up: Developing for the Symbian Previous: Developing for the Symbian
Allan Beaufour Larsen 2003-06-30