Configuring an environment via the rtisetenv_<platform> scripts

Most RTI environments rely on specific environmental variables to be set,  the most popular being  NDDSHOME.  Environmental variables are used for building DDS applications and for picking up QoS Files.  This article discusses basic environmental variables used for building and linking.

Any needed environmental variables can be set manually using OS/shell-specific commands. For example:


  • set NDDSHOME=C:\rti_connext_dds-6.1.0

Linux (bash):

  • export NDDSHOME=/home/user/rti_connext_dds-6.1.0

One or more configuration scripts are provided when installing target-specific platform packages (for example, rti_connext_dds-7.2.0-pro-target-x64Linux4gcc7.3.0.rtipkg).   These scripts are installed in $NDDSHOME/resource/scripts.   For every platform architecture present in the $NDDSHOME/lib subdirectory,  there are similarly named configuration script(s).

Some example scripts include the following:


  • C:\rti_connext_dds-7.2.0\resource\scripts\rtisetenv_x64Win64VS2017.bat

  • C:\Program Files\rti_connext_dds-5.3.1\resource\scripts\rtisetenv_i86VS2015.bat


  • /home/user/rti_connext_dds-6.1.2/resources/scripts/rtisetenv_x64Linux4gcc7.3.0.bash

  • /home/user/rti_connext_dds-5.3.1/resources/scripts/rtisetenv_i86Linux3gcc4.8.2.tcsh

These convenience configuration scripts can be used to configure the basic RTI-specific environment variables and paths. The scripts can be sourced using the OS/shell-specific commands:


  • C:\rti_connext_dds-7.2.0\resource\scripts\rtisetenv_x64Win64VS2017.bat


  • source /home/user/rti_connext_dds-6.1.2/resources/scripts/rtisetenv_x64Linux4gcc7.3.0.bash

These configuration scripts create the most common environment variables and paths:




  • PATH



  • LD_LIBRARY_PATH (for non-macOS Posix environments)

The use of each of the environment variables depends on the application, but in general NDDSHOME is global,  CONNEXTDDS_DIR and CONNEXTDD_ARCH are build-specific, and RTI_LD_LIBRARY_PATH specifies the path to libraries for static builds and for run-time shared library applications.

The configuration scripts are fairly basic but very useful.    Before performing builds or running an application,  it’s common practice to source the applicable configuration script.  

An example of a target platform specific configuration script is the $NDDSHOME/resources/scripts/rtisetenv_x64Linux4gcc7.3.0.bash.  This configuration script is installed as part of package rti_connext_dds-7.2.0-pro-target-x64Linux4gcc7.3.0.rtipkg.