Step 1: Creating a project for your source code

You need to create a project that will contain your source code and related files. The project will have an associated builder that incrementally compiles source files.

To create a project for your source code:

  1. In your workspace, you create a single project that reflects all the components that reside in your existing source tree by selecting File > New > Project….
  2. Select the type of project you want to create. For example, expand C++ and select C++ Project, then click Next.

    By default, the C/C++ Development Tools (CDT) filter the Toolchain and Project types that show in the resulting lists based on the language support for the project type you select.

  3. Name your project (e.g. EntireSourceProjectA).
  4. To tell the IDE where the resources reside in the filesystem (since they don't reside in your workspace), disable the Use Default Location option.
  5. In the Location field, type the path to your source (or click Browse…).
    Next, you want to select a template for your project from the following:
    • Executable — Provides an executable application. This project type folder contains the following templates.
      • Empty Project — a single source project folder that doesn't contain any files.
      • Hello World C++ Project — a simple C++ application with main().

      After specifying a template, the workbench creates a project with only the metadata files required for your project type. Now, you can modify these source files, as required, and provide the source files for the project's target. Note that for an Executable project type, a makefile is automatically created for you.

    • Shared Library — An executable module compiled and linked separately.
    • Static Library — A collection of object files that you can link into another application (libxx.a).
    • Makefile Project — Creates an empty project without any metadata files.

      By default, the Toolchain and template types that are currently shown in the lists are based on the language support for the project type that you selected.

  6. From the Project types list, expand Executable and select a project type. For example, an Empty Project provides you with a simple application.
  7. Select the QNX QCC toolchain from the Toolchain list.

  8. Click Finish. If a message box prompts you to change perspectives, click Yes. You should now have a project that looks something like this in the corresponding Projects view: