In this example we show how to create a new project using one of the built-in Carbide templates, how to build it into an executable, and how to launch the debugger to verify program accuracy. The steps to do this include:
Once you have a project in hand, the next thing to do is compile or build it into object code.
Building projects consists of a sbs or abld-based build system that wraps build functionality around existing SDK build tools that invoke makmake commands (e.g. makmake 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 from Templates. 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:
Choosing any of the above actions causes Carbide to build the selected project. A Build Project dialog (below) and a progress bar appear during a lengthy build operation. All build output is shown in a 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.
The 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 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 Console panel. This option is enabled by default. You can access this panel by selecting Window > Preferences > C/C++ > Build >
Console preference panel (below).
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.
Once compiling is complete use the Project Explorer, Problems, Console, and Executables views to locate and resolve any problems generated during the build.
Examine the Problems view to see what errors and warning messages were generated during the build. The Description column contains additional information about the problem that can help you resolve it.
Use the Console view to see where a specific problem occured during the build.
Use the Executables view to see what source files were used during the build. Sources shown in gray are those Carbide cannot find. Missing sources in an SDK not built on your machine are common, but missing sources that you created can be resolved.
Once you're resolved all the build errors in a project, its time to link the program to a specific target. This is done with a launch configuration.