Verifying consistency between libraries and header files in Connext
The version of the Connext header files and Connext libraries is tied to each Connext release. The header files and libraries used for compiling your application must come from the same version of Connext. An inconsistency between versions might cause undefined behaviors such as segmentation faults, access violations, and unexpected DDS errors.
If you want to do a sanity check after a migration, or if you suspect an inconsistency, it is possible to validate version consistency between the Connext header files and the Connext libraries used by your application. To validate version consistency, use the BUILD ID. Each Connext version has an associated BUILD ID that uniquely identifies the libraries and header files.
BUILD ID from Connext libraries
The version API module offers a way of retrieving version information for the RTI Connext product, the core library, and the C, C++, or Java libraries. You can retrieve the BUILD ID of the Connext libraries with the following set of APIs:
BUILD ID from Connext header files
To retrieve the BUILD ID of the header files, include a specific header file that defines the RTI_BUILD_NUMBER_STRING macro as the BUILD ID. This header file is specific to each library module and can be found under $NDDSHOME/include/ndds/<library_module>/<library_module>_buildid.h
It is important that you include this header file prior to any other Connext header files to ensure the BUILD ID (RTI_BUILD_NUMBER_STRING) comes from the desired library module.
For example, to obtain the RTI_BUILD_NUMBER_STRING of the Connext Core library, include the following header file in your application:
#include <ndds/core_version/core_version_buildid.h>
Once you have retrieved the BUILD ID from the headers and the BUILD ID from the libraries, you can compare the BUILD IDs to check whether they're the same (consistent). You can find examples attached to this article demonstrating how to check version consistency in C and C++.
Note: if you are using a patched version of Connext, the BUILD ID of the header files may differ from the libraries. This is expected if the patch version has introduced any changes in the header files. If there are changes in public header files, the corresponding Release Notes Supplement for the Connext patch will say so.