CrossStudio provides a facility to build projects in various configurations.

Build configurations and their uses

Configurations are typically used to differentiate debug builds from release builds. For example, debug builds will have different compiler options to a release buid: a debug build will set the options so that the project can be debugged easily, whereas a release build will enable optimization to reduce program size or increase its speed. Configurations have other uses; for example, you can use configurations to produce variants of software such as a library for for several different hardware variants.

Configurations inherit properties from other configurations. This provides a single point of change for definitions that are common to configurations. A particular property can be overridden in a particular configuration to provide configuration-specific settings.

When a solution is created two configurations are generated, Debug and Release, and you can create additional configurations using Build > Build Configurations. Before you build, ensure that the appropriate configuration is set using Project > Set Active Build Configuration or alternatively the configuration box in the build tool bar. You should also ensure that the appropriate build properties are set in the properties window.

Building your applications

When CrossStudio builds your application, it tries to avoid building files that have not changed since they were last built. It does this by comparing the modification dates of the generated files with the modification dates of the dependent files together with the modification dates of the properties that pertain to the build. If you are copying files then sometimes the modification dates may not be updated when the file is copied— in this instance it is wise to use the Rebuild command rather than the Build command.

You can see the build rationale CrossStudio is using by setting the Environment Properties | Build Settings | Show Build Information property and the build commands themselves by setting the Environment Properties | Build Settings | Echo Build Command property.

You may have a solution that contains several projects that are dependent upon each. Typically you might have several executable project and some library projects. The Project > Dependencies dialog specifies the dependencies between projects and to see the affect those dependencies have on the solution build order. Note that dependencies can be set on a per configuration basis but the default is for dependencies to be defined in the Common configuration.

You will also notice that new folders titled Dependencies has appeared in the project explorer. These folder contains the list of newly generated files and the files that they where generated from. These files can be decoded and displayed in the editor by right clicking on the file and seeing if it supports the View operation.

If you have the symbols window displayed then it will be updated with the symbol and section information of all executable files that have been built in the solution.

When CrossStudio builds projects it uses the values set in the properties window. To generalise your builds you can define macro values that are substituted when the project properties are used. These macro values can be defined globally at the solution and project level and can be defined on a per configuration basis. You can view and update the macro values using Project > Macros.

The combination of configurations, properties with inheritance, dependencies and macros provides a very powerful build management system. However, these systems can become complicated. To enable you to understand the implications of changing build settings, right clicking a node in the project explorer and selecting Properties brings up a dialog that shows the macros and build steps that apply to that project node.

Building all projects

To build all projects in the solution, do one of the following:

—or—

—or—

—or—

Building a single project

To build a single project only, do one of the following:

—or—

—or—

Compiling a single file

To compile a single file, do one of the following:

—or—

—or—

Correcting errors after building

The results of a build are displayed in the Build Log in the Output window. Errors are highlighted in red, and warnings are highlighted in yellow. Double-clicking an error, warning, or note will move the cursor to the appropriate source line.

You can move forward and backward through errors using Search > Next Location and Search > Previous Location.