Configure 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 other appropriate directory). If you want 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

For example, suppose your local C++ source files have the following structure:

-source -a +inc -b -mydir +src +out Makefile

In this example, we'll be working in a directory called mydir, where you can run make, which will allow us to run the make command to collect the libraries from the 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. In the Project Explorer, select File > New > C++ Project.
  3. Specify a name, such as mydir (or any name your choose).
  4. Deselect the option Use default project location.
  5. From the filesystem, browse to select the directory you just created (mydir).
  6. Select Makefile > Empty Project.
  7. Select the QCC Toolchain.
  8. Click Finish.
  9. Select a new project, right-click and then selectProperties.
  10. In the Properties dialog, select C/C++ General > Paths and Symbols.
  11. Select GNU C++, and then add a Directory(/source/a/inc) as your include path.

    This is a required step for the internal parser(for code navigation, refactoring, syntax highlighting, and so on).

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