Building and running an example application from a command line session consists of three basic steps:
|
|
To build an application from a command line session, carry out the following steps:
|
|
Before starting to build an example application, you need to ensure that the S60 SDK device points to the device that the application in question is intended to run on. In other words, you need to make sure that the appropriate SDK installation is set as default.
To check the device, perform the following steps:
Open the command prompt and enter the following
command and press enter:
devices
This command displays all Symbian SDK installations available to you, for example:
S60_3rd:com.nokia.S60 - default
S60_2nd_FP3:com.nokia.series60
In the above, you can see that in this case the S60_3rd:com.nokia.S60 is the default (active) SDK. To switch between devices, use the -setdefault option of the devices command:
C:\ devices -setdefault @S60_2nd_FP3:com.nokia.S60
|
Note: @ is part of the command. |
For more information, please, refer to SDK Help > Symbian Developer Library > How to Manage development for multiple device types for more information.
|
|
Once you have checked that the current SDK is the default SDK, you need to create an abld.bat file. The abld.bat file is a batch file that controls the build process. The abld.bat file is generated from the bld.inf component description file.
To create the abld.bat file, perform the following steps:
Open the command prompt and go to the application top-level folder.
For example, <S60_SDK_installation_directory>\S60Ex\helloworldbasic.
In the application top-level folder, locate the group subdirectory which contains the bld.inf file.
For example, <S60_SDK_installation_directory>\S60Ex\helloworldbasic\group\
Enter the following command and press enter:
bldmake bldfiles
This will create the abld.bat file in the current directory, making the abld command available for use.
In the following, you will use the command in creating build files and building the Hello World Basic example application. To find more information on other commands and switches, enter the abld command without arguments, for example:
<S60_SDK_installation_directory>\S60Ex\helloworldbasic\group\abld
The help message printed to the console provides more information on the command and its parameters.
|
|
With the abld command available, perform the following steps to create the needed build files:
Open the command prompt and go to the application folder, which now contains the abld.bat file.
For example,
<S60_SDK_installation_directory>\S60Ex\helloworldbasic\group\
Enter the following command and press Enter:
abld build winscw udeb
Notice, that you have now built a debug build of the Hello World Basic example application (that is, debug-type binaries), which you can run on the emulator. This build appropriate for your purposes at this point, as this enables you to run and view the application in the S60 emulator.
The build process creates the necessary build files and application binaries, including any resource files required.
This stage of the process may produce warnings. If there are errors, it may be because the exports of a DLL component were not frozen. If the application has a DLL component, you need to freeze the exports by performing the following steps.
In the application group folder, enter the following command:
abld freeze
For example,
<S60_SDK_installation_directory>\S60Ex\helloworldbasic\group\abld freeze
This ensures that the exports are frozen. To use the frozen exported interfaces, the application needs to be re-built after the freeze.
Rebuild the application after freezing the exports by entering the build command:
abld build winscw udeb
For example,
<S60_SDK_installation_directory>\S60Ex\helloworldbasic\group\abld build winscw udeb