CrossStudio provides a facility to build projects in various configurations. This is 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. You can also use configurations to produce variants of software—for example a library could be built for several different hardware variants.

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

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

###### To build all projects in the solution

- On the Build toolbar, click the Build Solution tool button.

> —or—

- From the Build menu, select Build Solution.

> —or—

- Type Alt+F7.

> —or—

- Right-click on the solution in the Project Explorer window.
- Select Build Solution from the popup menu.

###### To build a selected project only

- Select the required project in the Project Explorer.
- Build using the Build tool button.

> —or—

- Select the required project in the Project Explorer.
- From the the Project menu, select Build.

> —or—

- Right-click on the required project in the Project Explorer window.
- Select Build from the popup menu.

###### To compile a selected file

- Select the required source file in the Project Explorer window
- Click the right mouse button and select the Compile entry from the popup menu, or
- Press the Ctrl+F7 key.

The results of the build will be displayed in the Build tab of the output window, with any syntax errors highlighted in red. Clicking on syntax errors will cause the editor window to locate to the errant source line.

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.

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 enables you to specify 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.

When CrossStudio builds it tries to avoid building files that have not changed since the last build. 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.

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 enables a very powerful build management system to be quickly and easily deployed. However, these systems can become complicated. To enable you to understand the implications of changing build settings if you right click on a node in the project explorer and select Properties a dialog will display the macros and build steps that apply to that project node.