Configuring automated builds

To configure an automated build, you have to use make. If you're using a managed project, you have to use GNU Make Builder, which generates the Makefiles for you. If the projects don't have any dependencies, you only have to run make in a root directory (or another appropriate directory). If you need to build several projects, you have to create an external Makefile that references all projects.

Note: The generated Makefiles are hardcoded to the specific workspace location; they don't work well with source control.

Example: The Makefile is in the root

Suppose you have local C++ source files with the following structure:
-source -a +inc -b -mydir +src +out Makefile

In this example, we're working in a directory called mydir, where you can run make, which allows us to run the make command to collect the libraries from other parts of the filesystem, and obtain the includes (including the local ones from the mydir directory).

To create and build this project:
  1. In your filesystem, create a directory called mydir.
  2. Select File > New > C++ Project.
  3. Specify a project name, such as mydir (or any name you choose).
  4. Deselect the option Use default location.
  5. Click Browse to select the directory you just created (mydir) from the filesystem.
  6. From the list on the left, select the Makefile > Empty Project project type.
  7. Select the QNX QCC toolchain from the list on the right.
  8. Click Finish to create the project.
  9. In the Project Explorer, right-click the new project and choose Properties.
  10. In the Properties dialog, select C/C++ General > Paths and Symbols.
  11. In the Includes tab, select GNU C from the languages list, then click Add to select a directory (e.g., /source/a/inc) as your include path.

    This step is required for the internal parser, for code navigation, refactoring, syntax highlighting, and more.

  12. If you know the macro definitions used for the compiler (i.e., if you compiled using qcc -DDEBUG foo.c), include those here.
  13. Run the Build Project command.