Before jumping into writing your own application, it might be useful to compile and run an existing sample application. This chapter will take you through the generic steps of checking out a source file, compiling it, then running the compiled application on the emulator with the Swat debugger attached. The next two chapters explore GEOS development in greater detail by stepping through every step in creating the application "Tutorial". We recommend that you step through this chapter to acquaint yourself with the generic process of compiling an application, then carefully follow the tutorial to get a flavor for GOC, Swat debugging, and Geode Parameter files.
Typically, your development sequence will follow these steps:
mkmf
utility;
pmake
utility;The next section follows this sequence using the Dialogs sample application, though of course the same steps apply for any sample application. (Refer to the release notes in the README.TXT file or the Troubleshooting guide in the "Installing the SDK" chapter if you encounter problems.)
In the directory paths below, prepend your correct drive letter or path to PCGEOS and replace "workingdir" as appropriate. Also note that if you are using the Nokia 9000i SDK version 2.0, the directory labled here as N9000v11
will be N9000v20
in your development branch.
CD PCGEOS\workingdir\APPL
MD SDK_9000\DIALOGS CD SDK_9000\DIALOGS
COPY \PCGEOS\N9000V11\APPL\SDK_9000\DIALOGS\DIALOGS.GOC
mkmf
to create the makefile.
pmake
to compile and link the executable. This will create an error-checking version called
DIALOGSEC.GEO
.
start ss
.
start pcgeos\bin\swat
. (The full path is only necessary if there is also a Swat stub in your current directory, which you
do not
want to run.)
c
to continue.
Ctrl-W
to clear the "Where is it" default; then type
i
(lower-case) to ignore that file.
Ctrl-C
, then using the
Ctrl-W
,
i
sequence described above to ignore the file.
Ctrl-C
in the Swat window to bring command control back to Swat.
send dialogs
.
c
to continue Swat.
Ctrl-F12
to launch the Extras folder.
F1
to launch it. (The keys F1 - F4 correspond to the menu list on the right of the emulator window.)
Ctrl-C
to bring command control back to Swat, then type
quit
to exit the emulator.In this section, you learned how to check out a source code file by copying it from the Branch directory to your Working Directory, and then compile and run it on the emulator. Notice that it was not necessary to copy all the files from the \DIALOGS\ subdirectory in the N9000v11 Branch. When compiling and linking, the tools are smart enough to look for files in your Working Directory first and then look for whatever other files it needs in the Branch directory. This allows you to copy only the file or files you need to work on; shared files can remain in the Branch directory.
Now that you've gone through the basic steps of compiling and running a GEOS application, you can go on to the next chapter to create your own application from scratch.