UIQ Technology
Symbian OS Library

UIQ 3.1 SDK        UIQ developer portal

[Index] [Spacer] [Previous] [Next]



Building a Project in UIQ 3


1 Introduction

This guide explains how to use the command-based build tool for UIQ 3 based projects and how to import and build for several of the IDEs that are supported.


1.1 Further Reference

See the SDK documentation in the \documentation folder.

[Top]


2 Architecture

The build command generates binaries in the project platform that is selected. Each platform has two targets, UREL and UDEB.

UREL is used for release binaries.

UDEB is used for debug binaries.

The project platform is per default WINSCW, but it is not difficult to add other platforms. The platforms that are possible to use are listed in the bld.inf file which is usually located in the \group folder of the project.

In this file, the section PRJ_PLATFORMS is used to list the enabled platforms. If the section is missing or does not have a list, it defaults to WINSCW. To add a platform just add the corresponding platform name to the list.

Platforms supported by the UIQ 3.0 SDK are WINSCW, ARMV5 and GCCE.

Example:

PRJ_PLATFORMS
// specify the platforms your component needs to be built for here

WINSCW
GCCE

[Top]


3. Using the build command set

This section explains how to use the abld command.


3.1 Preparations

To perform a build of your project you need to prepare the environment by issuing the following command in your project's group folder:

bldmake bldfiles

Prepare your project by running bldmake...

Prepare your project by running bldmake bldfiles

This command produces the necessary build information.

bldmake then carries out the following three-stage process:

1

Creates the directory: \epoc32\build\absolute_path_to_bld.inf_file\,

2

Generates makefiles for the component in this directory,

3

Produces a batch file called abld.bat in the current directory.


3.2 Build

To start the build use the following syntax:

abld build [platform] [target] [project]

Building a debug binary for

Building a debug binary for "calc" project with the WINSCW platform

abld

The batch file that calls the build script.

build

One of several possible commands. Tells the build script to build a project. See abld command syntax for more commands.

platform (optional)

The platform you want to build, WINSCW or GCCE.

target (optional)

The target, UREL or UDEB, you want to build for a project.

project (optional)

If you have several project files in the same folder you can specify which project to build. When left blank, all projects will be built.

3.2.1 Specific compiler warnings

Some warnings are compiler specific they can be ignored. E.g. the code warrior compiler generates following warnings when building some of the examples:

[Top]


4. Installing GCC-E

The GCC-E installer is included in the SDK and is located under epoc32\tools\distrib if the computer already has GCC-E installed.

As mentioned earlier, you will need to update the PRJ_PLATFORMS section in the bld.inf file to be able to build for GCC-E.

[Top]


5. Importing projects

When importing projects into the Codewarrior IDE, Carbide or the Visual Studio 2003 IDE the following is important to keep in mind.


5.1 Codewarrior

To import a project into Codewarrior , start your Codewarrior IDE. Choose Import project from .mmp file. The following dialog appears:

The

The "Import project from .mmp file" dialog

Choose your SDK version and click on Next.

Select .mmp file and platform

Select .mmp file and platform

Use the Browse button to locate the .mmp file you want to import. Specify which platform you want to build for and click Finish.

The CALC project is successfully importe...

The CALC project is successfully imported

Now your project file is imported into Codewarrior.

UIQ Help

Follow the steps below to enable uiq3 help in CodeWarrior:

1

Locate the help folder. In the CodeWarrior installation location there is a folder named Help.

2

Rename the file _index.chm to _index_cw.chm. It is important that the name is correct!

3

Copy the files _index_uiq3.chm and uiq3.chm from the documentation folder in the uiq3sdk installation location over to the Help folder in the CodeWarrior installation location.

4

In the CodeWarrior Help folder, rename the _index_uiq3.chm to _index.chm. This should not replace a file if the renaming of the original file has been done.

5

Restart CodeWarrior.


5.2 Visual Studio

To generate a project file for Visual Studio 2003, change your working directory to the directory where your project.mmp file is located. Then issue the following command:

Makmake project.mpp VS2003

Generating a project file for the CALC p...

Generating a project file for the CALC project in Visual Studio 2003

The project file for Visual Studio 2003 will be located in the same directory as the command was issued in, if nothing else is specified.

The project file for the CALC project is...

The project file for the CALC project is now created in Visual Studio 2003

Once this is done you can open the project file in Visual Studio 2003 via File->Open->Project.

Opening a project in Visual Studio 2003

Opening a project in Visual Studio 2003

Select the project file you want to open.


5.3 Visual Studio + Carbide.vs

When opening projects in Carbide VS, just select the .mmp project file needed. This is done from File->Import Symbian Project in Visual Studio .Net 2003. If multiple .mmp files are used, the bld.inf file can be used instead.

Browse to the bld.inf or the .mmp file o...

Browse to the bld.inf or the .mmp file of the project to be imported

Remember that you must have the SDK descriptors for the UIQ SDK enabled to be able to import an MMP-file. The SDK descriptors are available from the UIQ Developer Community website and need to be downloaded and installed separately.

When developing for Symbian based phones using Visual Studio it is recommended to enable Carbide.VS. This simplifies the work by making it possible to directly import the Symbian project files (*.MMP) without needing to prepare a *.vsproj as described in 5.2. The direct import makes the structure more viewable as it does not import all of the header files, which the makmake solution does.

Good to know is that if you make any changes in your project after importing the MMP file, they will be written back to the MMP file.


5.4 More about Visual Studio .NET 2003

5.4.1 UIQ Help

To install UIQ Help in Visual Studio:

1

Open Explorer

2

Go to the folder where the SDK was installed

3

Open the folder Documentation\VisualStudio

4

Doubble click on the file Register.cmd

5

Restart Visual Studio

To uninstall UIQ Help in Visual Studio:

1

Open Explorer

2

Go to the folder where the SDK was installed

3

Open the folder Documentation\VisualStudio

4

Double click on the file Unegister.cmd

5

Restart Visual Studio

5.4.2 Known issues

The PATH needs to include the Visual Studio binaries, for example C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools. The target for Visual Studio .NET 2003 is named VS2003. To create project and solution files for VS, run bldmake bldfiles, then for example abld makefile VS2003. The VS files will by default end up in the /epoc32/build/<your project path>/winscw directory. When building with Visual Studio .NET 2003, not using Carbide.vs, set the EPOCROOT variable to (use uppercase): EPOCROOT=\\. For example, EPOCROOT= \Symbian\UIQ3SDK\. This will also require that the SDK is installed on the same drive as Visual Studio.

When building from within VS .NET 2003, if you might get the error:

Performing Makefile project actions \Symbian\UIQ3SDK\epoc32\tools\make.exe: *** Recursive variable ‘PATH’ references itself (eventually). Stop. Project: error PRJ0019: A tool returned an error code from "Performing Makefile project actions"

This is most likely due to a bug that if the last item in your PATH environment variable ends with a backslash '\' without a following semicolon ';' the tool will fail. A workaround is to change the PATH statement to end without a backslash or add a semicolon, then rebuild the makefiles.


5.5 Carbide.c++ (Eclipse)

To import a Symbian project file (*.MMP) to your workspace use File->Import->Symbian MMP File.

Importing a project in Carbide.c++ (Ecli...

Importing a project in Carbide.c++ (Eclipse)

Press Next to come to the next dialog. Click Browse to locate the MMP file you want to open. Mark the applicable SDKs and press Finish.

Browse to the .mmp file

Browse to the .mmp file

Your project is now imported into Carbide.c++.

[Top]


6 Getting started with Java IDE

This description applies to NetBeans 5.0, but similar actions should be performed also for other Java IDEs.


6.1 Adding the UIQ3 platform

1 Add the J2ME compatible platform UIQ 3 SDK to the IDE.

2 Launch NetBeans 5.0 and select Tools -> Java Platform Manager:

Java platform manager

Java platform manager

3 Choose Add Platform and Add Java Platform dialog appears.

4 Select option Java Micro Edition Platform Emulator and then Next.

5 The IDE scans for compatible platforms and when done select Find More Java Platform Folders...

6 Find the following folder in the SDK installation: \epoc32\tools\java\sei\winscw\udeb\hmidp91 and then Search.

7 The search path should be listed in the Add Java Platform dialog. Ensure it is checked and then Next and Finish.

8 The UIQ 3 SDK platform should now be listed in the Java Platform Manager dialog.


6.2 Recommended way of debugging a project

1 Select Tools -> Java Platform Manager.

2 Select the UIQ 3 SDK platform and then Tools & Extensions -> Open Utilities:

UIQ 3 SDK Utilities dialog

UIQ 3 SDK Utilities dialog

3 In the field Agent Host type the emulator IP address which was set using the SDK Configurator.

4 Select Launch now.

5 The emulator is launched and is kept running (keep emulator running checked in the UIQ 3 SDK Utilities dialog).

6 Ready to debug projects!