## Building Projects and Symbian Components

Building projects consists of a new sbs-based build system (Raptor) that wraps build functionality around existing SDK build tools which invoke makmake commands (e.g. bldmake bldfiles and sbs build).

The plug-ins provide extra functionality to set up suitable build configurations for Symbian OS C++ projects. The initial selection of a build configuration is done when you create a project, as described in Creating New Projects. You can later change the Active Build Configuration. A command is available (Project > Build All Configurations) to build all the selected build configurations in a batch.

Building Symbian OS C++ projects can involve the use of Symbian OS specific tools, such as the Symbian OS resource compiler. For detailed information on such tools, see the documentation for the SDK that you are using.

You build projects to process the source files that comprise a program and generate object code. The compiler flags syntax errors in the source files. Use the Properties for <project_name> dialog to control how the project is built. The following methods build a project:

- Build All Configurations (CTRL+ALT+A) —builds all build configurations for a project
- Build Project (CTRL+B) — builds the entire project if it has never been built before or on subsequent builds only those files that have changed since the last build operation
- Build Working Set—specify which projects to build in a working set

Figure 1 - Project menu includes all build options

#### Building a project

- Choose one of the following to build a project:

From the ... | Do the following...
--- | ---
Menu bar | Click the Project > Build Project menu option.
Toolbar | Click the Build icon () on the toolbar
Project | Right-click the project Select Build Project

Carbide.c++ builds the project. A build dialog and a task bar appear during a build process. All build output is shown in the Console view while build errors and warnings appear in the Problems view.

Whether a full build or incremental build is requested, Carbide forwards the request to the SDK make system. The SDK make system determines if anything needs to be built. Carbide always checks that makefiles are up-to-date and dependencies present.

Projects are also built if you make a change to it and then click Debug. It may be useful to automatically save modified resources before a manual build process by enabling the Save automatically before build option in the Window > Preferences > General > Workspace preference panel.

NOTE If you want to turn off building before launching, uncheck the Build (if required) before launching option in the Window > Preferences > Run/Debug > Launching preference panel.

When performing a build, output is displayed in the Console view. If you do not want to clear the console before each build you need to uncheck the option Always clear console before building in the Build Console panel. This option is enabled by default. You can access this panel by selecting Window > Preferences > C/C++ > Build > Build Console preference panel (figure 4).

Figure 4 - Build Console preference panel

Not clearing the console is useful when you are performing multiple builds, such as a regular project build, building a project package (.pkg) file, and building a ROM image. For example, if you do not clear the console before each build, then a subsequent build will not overwrite information from a previous build.

##### Concepts

- Projects

##### Tasks

- Cleaning Projects
- Compile Source
- Creating Projects
- Creating a Launch Configuration
- Debugging a Symbian OS Program
- Build Symbian Component
- Clean Symbian Component
- Build Package (.pkg) File
- Importing BLD.INF Files