Choosing the OS version for building programs
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.
- On Windows, run:
base_directory\qnxsdp-env.bat
- On Linux, run:
source base_directory/qnxsdp-env.sh
Environment variables
- 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.
- QNX_HOST
- The location of host-specific files.
- QNX_TARGET
- The location of target backends on the host machine.