## Building Projects and Symbian Components

Building projects consists of a new abld-based build system that wraps build functionality around existing SDK build tools that invoke makmake commands (e.g. bldmake bldfiles and abld 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. The Build Configurations also provides a command (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> window to control how the project is built. The following methods build a project:

- Build All Configurations—builds all build configurations for a project
- Build Working Set—specify which projects to build in a working set
- 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

Figure 1 - Right-click project name to build a project

#### Building a project

- Right-click the project name in the Project Explorer view and select Build Project (Figure 1)

or

- Select the Project > Build Project menu item

or

- Click the Build icon in the tool bar (Figure 2) to build the current build configuration

Figure 2 - Build icon

or

- Select a build configuration using the Build icon’s dropdown list in the tool bar (Figure 2)

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.

Project is 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 window. 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 Console preference panel (figure 2).

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.

Figure 4 - Build Console Preference Panel

##### 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