Choosing the OS version for building programs

QNX SDP8.0Programmer's GuideDeveloper

Whether you're using the command line or the IDE, you can install multiple versions of QNX SDP and build programs for multiple versions of QNX OS.

For information about using the IDE to choose the QNX OS version for which you want to build programs, see the QNX Momentics IDE User's Guide. This guide also explains how to start the IDE and choose the build target.

If you're using the command line, you can choose the QNX OS version by running a script to set the necessary environment variables (see Environment variables below) for your command-line window. The script's location depends on the QNX OS version that you want to use. For instance, if you want to build programs for QNX OS 7.1, you must run the script in the base directory where you installed QNX SDP 7.1.

The name of the script depends on your development host OS:
  • On Windows, run:

    base_directory\qnxsdp-env.bat

  • On Linux, run:

    source base_directory/qnxsdp-env.sh

Note:
You need to set up the environment in every command-line window in which you want to run the tools.

Environment variables

QNX OS uses these environment variables to locate files on the host machine:
MAKEFLAGS
Include base_directory/target/qnx/usr/include so that QNX Makefiles (e.g., qconfig.mk) are available.
PATH
Add $QNX_HOST/usr/bin so that QNX tools are available on the command line.
QNX_CONFIGURATION_EXCLUSIVE
The location of the configuration files for the installed versions of QNX OS 7.0 or later.
You need to set this variable only when the configuration files are located in a directory other than $HOME/.qnx or QNX_CONFIGURATION.
QNX_HOST
The location of host-specific files.
QNX_TARGET
The location of target backends on the host machine.
Page updated: