1. Building and running the examples
This section explains how to build and run the SDK example applications. All the applications are built and run in the same way. The applications can be built to run on the Symbian OS emulator, or the target device.
2. Building for the Symbian OS emulator
The SDK and the example applications should be installed.
To build an application, do the following:
1. Create the abld file.
In a command window, go into the application''''s top level folder (the one which contains the bld.inf file) e.g. /animation/gui/group and enter the following command:
bldmake bldfiles
This will create the abld.bat file in the current directory.
2. Create the Wins build files and build the application.
In the application''''s top level folder enter the following command:
abld build wins udeb
This will create the necessary build files and build the application, including any resource files required. This stage may produce warnings. If it produces errors, a DLL component may not have had its exports frozen. Perform step 3, below.
3. If the application has a DLL component, freeze the exports.
If an application contains a DLL component this step must be performed, otherwise it can be skipped. In the application''''s top level folder enter the following command:
abld freeze
This will ensure that the exports are frozen. Then enter the following command (repeated from step 2):
abld build wins udeb
This will build against the newly frozen interface..
3. Running the application on the emulator
To run the application on the emulator, carry out the following steps:
1. Run the emulator.
From a command window, run the command
Epoc
to launch the debug emulator, or
epoc -rel
to launch the release emulator. The emulator window will appear.
2. Find the application folder.
When the emulator has started, a set of applications and folders will appear. Find the Other folder.
3. Run the application.
Select the Other folder, and then select the relevant application icon. This will run the application.
4. Running the application from Visual C++
The emulator can also be run from Microsoft Visual C++. This can be useful when modifying or debugging the application.
Create the Visual C++ workspace and project files.
In the application''''s top level folder enter the following command:
abld makefile vc6
This will create the Visual C++ project files in a subdirectory of the %EPOCROOT%epoc32/Build'''' directory, where %EPOCROOT% is the pathname of the emulator root; e.g. /Symbian/6.0/NokiaCPP/
(在我使用的siemens SX1中目录为Q:/Siemens/SX1/bin )
Run Microsoft Visual C++ and open the workspace file
The workspace file a pathname of the following form:
%EPOCROOT%Epoc32/Build/ApplicationPathname/Group/ApplicationName/Wins/ApplicationName.DSW
where:
%EPOCROOT% is the pathname of the emulator root; e.g. /Symbian/6.0/NokiaCPP/ (在我使用的siemens SX1中目录为Q:/Siemens/SX1/bin )
ApplicationPathname is the pathname of the example application folder; e.g. /Examples/animation
ApplicationName is the name of the example application. e.g. animation
So the whole pathname could be, e.g.
/Epoc32/Build/Examples/animation/Group/animation/Wins/animation.DSW
Select the Execute item from the Build menu.
When the ''''Executable for Debug Session'''' dialog box appears press the command button in the right of the dialog box and select browse from the pop-up menu. Using the browse dialog select the file %EPOCROOT%epoc32/release/wins/udeb/epoc.exe. The emulator will run. You only need to do this once. When you subsequently select execute for this application, the emulator will automatically run.
5 Building for the target device
The SDK and the example applications should be installed.
To build the applications, do the following:
5.1 Create the abld file.
Go into the application''''s top level folder (the one which contains the bld.inf file) e.g. ''''/animation/gui/group'''' and enter the following command:
bldmake bldfiles
This will create the abld.bat file in the current directory.
5.2 Create the target build files and build the application.
In the application''''s top level folder enter one of the following commands, depending upon whether you wish to target the ARMI or THUMB instructions sets:
abld build armi urel
abld build thumb urel
This will create the necessary build files and build the application, including any resource files required. This stage may produce warnings. If it produces errors, a DLL component may not have had its exports frozen. Perform stage 3, below.
5.3 If the application has a DLL component, freeze the exports.
If an application contains a DLL component this step must be performed, otherwise
it can be skipped. In the application''''s top level folder enter the following command:
abld freeze
This will ensure that the exports are frozen. Then enter the following command (repeated from step 2):
abld build armi urel
abld build thumb urel
This will build against the newly frozen interface.
开发过程
最新推荐文章于 2023-05-12 15:20:17 发布