.. highlight:: none .. _build_environment: Setting Up Your Environment =========================== This section includes information regaring compiling and linking an application against |me| and how to set up an environment. Note that this section is generic and common for all platforms; the platform notes section may include additional information relevant for a specific platform. The ``RTIMEHOME`` environment variable must be set to the installation directory path for |rti_me|. .. only:: not cert Compiler Preprocessor Defines ----------------------------- All application code including |me| header-files and all code generated with *rtiddsgen* **must** be compiled with ``-DRTI_CERT=1`` flag when using the |me| CERT profile. When compiling against release libraries the ``-DNDEBUG=1`` flag **must** be added. Compiler Header Files Path -------------------------- When compiling an application, the |me| header files are located in the following directory and the compiler's include search path must include this directory: :: RTIMEHOME/include Libraries --------- The |me| library comes in two different flavors: - ``Release``: Compiled without additional debug information. - ``Debug``: Compiled with additional debug information. Libraries with debug have a ``d`` suffix. .. only:: cert There are two development environments for |me|: - Compiling and linking against headers and libraries built from source provided in this bundle. - Compiling and linking against headers and libraries from the Certification Data Package (CDP). Note that the CDP **only** includes header files and libraries. In particular, *rtiddsgen* is **not** included on the CDP. .. note:: When compiling and linking against librarires built from source, it is important to understand that the certification evidence is **not valid**. The certification evidence on the CDP is **only** valid when compiling and linking against the header files and libraries on the CDP. In general, the development environments are the same, with the main difference that the CDP **must** be installed independently from this bundle and that *rtiddsgen* must be invoked from the installation path for this bundle. .. note:: The CDP includes this User Manual and API reference manual. However, the documentation may differ slightly in wording and content as they may be written and released and at different times. However, there are **no** differences in supported features, functionality, behavior, and limitations, only in presentation. Two different logical paths are used for the remainder of this document: - RTI_PATH=/rti_me_cert.1.0 - CDP_PATH=/rti_me_cert.1.0 Compiler Preprocessor Defines ----------------------------- All application code including |me| header-files and all code generated with *rtiddsgen* **must** be compiled with the RTI_CERT flag. For example, with qcc the following flag **must** be added: :: qcc -DRTI_CERT=1 When compiling against release libraries, ``rti_mez``, the NDEBUG flag **must** be added: :: qcc -DNDEBUG=1 Compiler Header Files Path -------------------------- When compiling against the CDP, the header files are located in the following directory. The compiler's include search path must include this directory: :: CDP_PATH/rti_me_cert.1.0/include/rti_me When compiling against the bundle, the header files are located in the following directory. The compiler's include search path must include this directory: :: RTI_PATH/rti_me_cert.1.0/include/rti_me Library Path ............ The |me| library comes in two different flavors: - ``Release``: This is a library compiled without additional debug information. For |me| this library also **excludes** logging. This libray name is called ``rti_mez``. The actual name is platform dependent, but it is typically called ``librti_mez.a``. - ``Debug``: This is a library compiled with additional debug information. This libray name is called ``rti_mezd``. This library is **not** available on the CDP. The actual name is platform dependent, but it is typically called ``librti_mezd.a``. CDP Libraries ''''''''''''' The libraries on the CDP are located under: :: CDP_PATH/rti_me_cert.1.0/lib/ Please consult the CDP documentation for the exact target-name. Source Libraries '''''''''''''''' The libraries built from the source in this bundle are located under: :: RTI_PATH/rti_me_cert.1.0/lib/ The target name is either the name passed to the ``--target`` or the ``--name`` option if both ``--target`` and ``--name`` are specified to ``rtime-make``. For example: :: rtime-make --target armv8QOS2.1qcc_gpp5.4.0 In this case the libraries will be located under: :: RTI_PATH/rti_me_cert.1.0/lib/armv8QOS2.1qcc_gpp5.4.0 On the other hand, if the libraries are build with this command: :: rtime-make --target armv8QOS2.1qcc_gpp5.4.0 --name armv8QOS2.1qcc_gpp5.4.0_mylib In this case the libraries will be located under: :: RTI_PATH/rti_me_cert.1.0/lib/armv8QOS2.1qcc_gpp5.4.0_mylib rtiddsgen ......... The *rtiddsgen* compiler is used to generate type-support code. It is located under: :: RTI_PATH/rti_me_cert.1.0/rtiddsgen .. note:: The CDP does **not** include *rtiddsgen*. Thus, *rtiddsgen* **must** always be invoked from the installation path for this bundle, RTI_PATH. *rtiddsgen* is invoked with the *rtiddsgen* script: :: RTI_PATH/rti_me_cert.1.0/rtiddsgen/scripts/rtiddsgen