You can install and work with multiple versions of QNX Neutrino.
Whether you're using the command line or the IDE, you can choose which
version of the OS to build programs for.
QNX Neutrino uses these environment variables to locate files on the host
machine:
- QNX_CONFIGURATION_EXCLUSIVE
-
The location of the configuration files for the installed versions of
QNX Neutrino 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_CONFIGURATION
- The location of the configuration files for the installed versions of
QNX Neutrino 6.6 or earlier.
- QNX_HOST
- The location of host-specific files.
- QNX_TARGET
- The location of target backends on the host machine.
In QNX SDP 6.5, a system profile sets up these environment variables; for later releases, you need to
run a script:
where base_directory is where you installed QNX SDP.
The name of the script depends on the release and the development host:
Release |
Windows |
Linux |
Mac |
QNX SDP 6.6 |
qnx660-env.bat |
qnx660-env.sh |
Not supported |
QNX SDP 7.0 |
qnxsdp-env.bat |
qnxsdp-env.sh |
qnxsdp-env.sh |
Note:
In QNX SDP 6.6 or later,
you need to set up the environment in every command-prompt window that you want to run the tools in.
For the command-line tools, how you choose which version of the OS to build programs for depends on
how you installed QNX SDP:
- If you installed QNX SDP so that it uses the same QNX_CONFIGURATION directory as an
earlier version of QNX SDP, use the
qconfig
utility.
- If you didn't use the same QNX_CONFIGURATION directory:
- To choose 6.5.0, use its version of qconfig.
On Windows you can also use QWinCfg, a graphical front end
for qconfig; for example, choose
from the Start menu.
- To choose 6.6 or later, use the qnx.*-env.bat or qnx.*-env.sh command
as described above to set up the environment.
QNX SDP 6.6 or later includes qconfig, but you can't use it to select the version of the
OS unless you used the same QNX_CONFIGURATION directory as for 6.5.
Here's what qconfig does:
To start the IDE:
- In QNX SDP 7.0:
- on Windows, choose
from the Start menu, or use the desktop icon
- on Linux, run base_directory/qnxmomentics/qde
- on macOS, click the icon labelled QNX Momentics IDE from the launchpad
- In QNX SDP 6.6, run base_directory\run-qde.vbs on Windows,
or base_directory/run-qde.sh on Linux or macOS.
These programs set up the environment and then start the IDE.
- In QNX SDP 6.5, use the desktop icon or run
$QNX_HOST\usr\qde\eclipse\qde.exe on Windows,
or run $QNX_HOST/usr/qde/eclipse/qde on Linux.
Run these commands in a shell that's set up for the QNX SDP 6.5 environment.
You can also choose the build target if you're using the IDE; see
Switching between SDKs
in the Reference chapter of the IDE User's Guide.