NAB plug-in for MWT user guide June 21, 2006
Contents Previous

Chapter 4 Compile and Build

All operations in this chapter require that a project be open.
For details on projects, see Section 3.2, "[C/C++ Projects] View."

4.1 Setting Up a Build Environment 

4.1.1 Compiler and linker settings 

You can use the [Project Properties] dialog box to make compiler/linker settings, parameter settings to be transferred to a compiler/linker, and build method settings.

4.1.1.1 Compiler settings 

The following table lists compiler settings that can be made.

Item

Description

Compiler

Specifies the compiler that creates an application to be run.

Common include path

Specifies the include information that is passed to a compiler regardless of whether [Compile mode] is selected.

Common compiler flags

Specifies the parameter information that is passed to a compiler regardless of whether [Compile mode] is selected.

Compile mode

Is selected so that the selected application is debugged by a debugger.

Include path

Specifies the include information that is passed to a compiler according to the selected tab mode.

Compiler flags

Specifies the parameter information that is passed to a compiler according to the selected tab mode.

The procedure to do this is explained below.

 Procedure

  1. Select and right-click a project in the [C/C++ Projects] view, and select [Properties] from the resulting pop-up menu.

    Figure: Selecting [Properties]

  2. Select [NAB/MWT Project Settings] in the [Properties for "Project name"] dialog box, and click the [Compiler Settings] tab.

    You can specify a compiler, parameters to be passed to the compiler, and compilation in debug mode.

    Figure: [Properties for "Project name"] dialog box


    Click to Enlarge.

4.1.1.2 Linker settings 

The following table lists linker settings that can be made.

Item

Description

Linker

Specifies the linker that creates an application to be run.

Common library path

Specifies the library information that is passed to a linker regardless of whether [Compile mode] or [Static option] is selected.

Common linker flags

Specifies the parameter information that is passed to a linker regardless of whether [Compile mode] or [Static option] is selected.

Static option

Is selected so that an application is created through a static link.

Libraries

Specifies library information that is passed to a linker in the selected tab mode.

Output file

Specifies an output file name for an application that is run in the selected tab mode.

The procedure to make the linker settings is explained below.

 Procedure

  1. Open the [Properties for "Project name"] dialog box by following the procedure for compiler settings, and click the [Linker Settings] tab.

    You can specify a linker, parameters to be passed to the linker, and compilation in debug mode.

    Figure: [Properties for "Project name"] dialog box


    Click to Enlarge.

4.1.2 Build target settings 

You can specify the build target in the [Project Properties] dialog box.

The following table lists build target settings that can be made.

Item

Description

Native

An application that runs on the development host machine is made the build target.

If a project is moved to another platform, the project will retain platform-dependent compiler/linker setting data. Therefore, to build the project after moving it to the other platform, first select [Platform compatible], download platform-dependent data, and then build it.

For example, this applies to building a project for the native target created on a WIN32 platform.

Platform compatible

Platform-independent target type.

This type is used for a build as the native target of a platform on the build host.

For example, a project would be built for WIN32 as though it were built on a WIN32 platform, or it would be built for Linux as though it were built on a Linux platform.

Other

Type used for a build as the build target according to OS and CPU settings

The procedure to do this is explained below.

 Procedure

  1. Open the [Properties for "Project name"] dialog box by following the procedure for compiler settings, click the [Target Settings] tab, and select a build target in the [Build target] text box.

    Figure: [Properties for "Project name"] dialog box


    Click to Enlarge.

    The appropriate build target to be selected depends on the platform used.

4.1.3 Default project encoding setting 

You can specify the default encoding in the [Project Properties] dialog box for the case that that encoding is not explicitly specified in programs.

 

The procedure to do this is explained below.

 Procedure

  1. Open the [Properties for "Project name"] dialog box by following the procedure for compiler settings, click the [Target Settings] tab, and select an encoding type in the [Encoding] text box.

    [Properties for "Project name"] dialog box


    Click to Enlarge.

4.1.4 Application type setting 

You can specify the type of application to be built, in the [Project Properties] dialog box.

 

The procedure to do this is explained below.

 Procedure

  1. Open the [Properties for "Project name"] dialog box by following the procedure for compiler settings, click the [Target Settings] tab, and select an application type in the [Application type] text box.

    Figure: [Properties for "Project name"] dialog box


    Click to Enlarge.

    The appropriate application type to be selected depends on the platform used.

4.1.5 Build target environment settings 

Some build targets require a directory to be set as the compiler environment base.

Specify a directory as the compiler environment base in the [Project Properties] dialog box.

 

The procedure to do this is explained below.

 Procedure

  1. Select and right-click a project in the [C/C++ Projects] view, and select [Properties] from the resulting pop-up menu.

    Figure: Selecting [Properties]

  2. Select [NAB/MWT Platform SDK Environment] in the [Properties for "Project name"] dialog box.

    You can use build target items to make compiler environment settings on the platform for the build target.

    Figure: [Properties for "Project name"] dialog box


    Click to Enlarge.

4.2 Building 

To run a project created with this tool, the project must be compiled and linked.

 

The procedure to do this is explained below.

 Procedure

  1. Build the project from the [Project...] menu.

    If an error message is displayed in the [Console] view, take action according to the error message contents to correct the error.

    To build the project, select [Clean] from the [Project...] menu, and run "build."

    The build processing after you select [Clean] varies as follows:

    • If [Build Automatically] is checked on the [Project...] menu, the build starts automatically.
    • If [Build Automatically] is not checked on the [Project...] menu, check [Start a build immediately] in the [Clean] dialog box, and click [OK].

    Figure: Making a build selection

  2. The compile information window shown below appears when compilation starts.

    The [Console] view shows compiled information.

    If an error message is output, check its information.

    To stop compilation, click the [Cancel] button.

    Figure: [Console] view

4.3 Running a Created Application  

To run a created application, create a runtime environment for it from the [Run Wizard] dialog box.

The runtime environment retains the application, parameters to be passed to the application, and its run conditions.

Once the runtime environment is set up from the [Run Wizard] dialog box, you can select it to run the application.

 

The procedure to do this is explained below.

 Procedure

  1. Select [Run...] from the [Run] menu.
  2. Select [C/C++ Local Application] in the [Run...] dialog box, click the [New] button, and create a runtime environment.

    Figure: Creating a runtime environment

  3. Select the created application in the [C/C++ Application] text box of the [Run...] dialog box.

    Figure: Creating a runtime environment

  4. Debugger settings are made for debugging as part of the work of specifying run conditions. Select the [Debugger] tab and [GDB Debugger]. Click [Run].

    Figure: Running an application

    This tool does not support cross debuggers.

    Use this tool together with another cross debugger tool.

4.4 Debugging 

A created module can be debugged by a debugger.

 

The procedure to do this is explained below.

 Procedure

  1. Select [Run..] from the [Run] menu.

    Figure: Selecting [Run...]

  2. If an appropriate runtime environment has already been created, simply click the [Debug] button to start debugging.

    If the runtime environment has not been created, click the [New] button at the bottom left of the dialog box, and create a runtime environment. On the [Main] tab in the [Run Wizard] dialog box that appears, specify the name of the project containing the relevant runtime module in [Project...] and the runtime module name in [C/C++ Application].

    Figure: Making settings on the [Main] tab

  3. Select the [Debugger] tab, and make settings as shown below.

    Figure: Making settings on the [Debugger] tab

    This tool does not support cross debuggers.

    Use this tool together with another cross debugger tool.

  4. Click the [Debug] button to start debugging.

    Figure: Starting debugging


Contents Previous

All Rights Reserved, Copyright(C) FUJITSU LIMITED 2005-2006