Choosing the version of the OS
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 Neutrino.
For information about how to use the IDE to choose the QNX Neutrino version for which you build programs, see the QNX Momentics IDE User's Guide.
If you are using the command line, you choose the QNX Neutrino version
for which you build your programs by running or sourcing a script to set environment variables
(see Environment variables
below) for your command-line window.
The name of the script you run or source depends on the QNX Neutrino
version for which you want to build programs. For instance, if you want to build a program for
QNX Neutrino 7.1, you must run or source the script in the base
directory where you installed QNX SDP 7.1 (either qnxsdp-env.bat or
qnxsdp-env.sh, depending on your development host). For SDP 6.5, see
QNX SDP 6.5
below.
The name of the script depends on the release and the development host:
| Release | Windows | Linux | Mac |
|---|---|---|---|
| QNX SDP 7.0 and more recent | qnxsdp-env.bat |
qnxsdp-env.sh |
qnxsdp-env.sh |
| QNX SDP 6.6 | qnx660-env.bat |
qnx660-env.sh |
Not supported |
QNX SDP 7.0 and more recent
Run or source the appropriate script:
- On Windows, run:
base_directory\qnxsdp-env.bat - On Linux or Mac, run:
source base_directory/qnxsdp-env.sh
where base_directory is where you installed QNX SDP.
QNX SDP 6.6
Run or source the appropriate script:
- On Windows, run:
base_directory\qnx660-env.bat - On Linux, run:
source base_directory/qnx660-env.sh
where base_directory is where you installed QNX SDP.
QNX SDP 6.5
In QNX SDP 6.5, installation is performed as an admin or root user, and a system profile sets up the QNX environment variables globally, so you only need to set environment variables if you have modified them; for example, if you changed them to build programs for another QNX Neutrino version.
To set environment variables in QNX SDP 6.5, run the qconfig utility from the QNX SDP 6.5 installation directory.
On Windows you can also use QWinCfg, a graphical front end for qconfig; for example, choose from the Start menu.
Environment variables
QNX Neutrino uses these environment variables to locate files on the host machine:
- MAKEFLAGS
- Include base_directory/target/qnx7/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 Neutrino 7.0 or later.
- 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.
Starting the IDE
To start the IDE:
- In QNX SDP 7.1:
- on Windows, choose from the Start menu, or use the desktop icon
- on Linux, run
IDE_base_directory/qde,
where IDE_base_directory is where you installed the IDE package
(e.g., ~/qnxmomenticside)
Note:In QNX SDP 7.1, the IDE is packaged separately from QNX SDP. For details on installing the IDE baseline package, see the
Install the QNX Momentics IDE
topic in the QNX Software Center User's Guide. - on macOS, click the icon labelled QNX Momentics IDE from the launchpad
- 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. 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.
