Build one or more IDE projects


mkbuild -ws workspace [options]
mkbuild [-project] dir [options]
mkbuild -ws workspace -projects project1[,project2, …] [options]

Runs on:

Windows, Linux hosts


The path of the IDE workspace.
A full project pathname where one or more projects are built.
project1[,project2, …]
The list of projects to build, where each project is a type supported by the IDE: Makefile project, QNX project, Managed project, and Container project.
options can be:
Stop on the first compile error.

Note: This option isn't valid for a full workspace build.

-targets target1[,target2…]
The make targets (build, clean, rebuild, or a custom target).

For a Makefile or Container project, use this option to pass the configuration name to mkbuild. Note that the configuration names you define must not contain spaces or non-standard characters; the list of unacceptable characters is given below.

-variant variant
The build variant:


In the project and configuration names, and the list of projects, targets, or variants, don't use spaces or any of the following characters:

| ! $ ( " ) & ` : ; \ ' * ? [ ] # ~ = % < > { }

These characters cause problems because mkbuild doesn't like them in directory and file names.


The mkbuild utility builds one or more projects in the IDE workspace, producing the same results as an interactive build in the IDE. Building from the command line using mkbuild uses the IDE project setup, and it runs the IDE (without the GUI) to perform a build for specified projects.

Note: The mkbuild utility doesn't work on QNX Neutrino hosts because the IDE isn't included on self-hosted QNX Neutrino systems.

Use QDE=path to override the default IDE installation location ($QNX_HOST/usr/qde.) This variable must be defined on the command line before the mkbuild command.

To build to a specified location, you must have write permission.

If a project doesn't support a target, the default target is built. By default, for make projects, no targets are defined; make targets have to be created from the GUI in order to use named targets.


Build a default target and variant for the project projectA:

mkbuild /home/user/workspace/projectA

Build all projects in a specified workspace:

mkbuild -ws /home/user/workspace

Build using another IDE installation:

QDE=/home/user/IDE4.7 mkbuild ... 

Build the projectA and projectB projects with clean, all targets, and the x86 variant/configuration:

mkbuild -ws /home/user/workspace -projects projectA,projectB -target clean,all -variant x86

Exit status:

All the specified projects were built successfully.
An error occurred.

See also:

chmod, mkefs, mketfs, mkifs, mkimage, mksbp, qde

Building projects in the Developing C/C++ Programs chapter in the IDE User's Guide