Universal Messaging 9.8 | Universal Messaging Developer Guide | Enterprise APIs | Enterprise Developer's Guide for C++ | Prerequisites | Environment Setup : Linux
 
Environment Setup : Linux
The guide below explains how the Universal Messaging C++ environment can be set up for compiling and running the applications on Linux 64-bit operating system.
Running a Universal Messaging C++ application requires the system to know the location of certain runtime libraries. OpenSSL is assumed to be installed and the location known to the system. The POCO libraries and Nirvana.so are found in cplus/linux64/lib. To make these libraries known to the system, several methods can be used:
1. By setting the LD_LIBRARY_PATH environment variable:

export LD_LIBRARY_PATH=
<UM_Installation_Dir>/cplus/linux/lib:$LD_LIBRARY_PATH
This will allow programs to be compiled and run in the current shell.
2. In order to make the libraries globally available you can copy the libraries into /usr/local/lib.
3. Another method to make the libraries globally available is by using ldconfig. This requires root access to the system:

[root]$ cd /etc/ld.so.conf.d
[root]$ echo <UM_Installation_Dir>/cplus/linux/lib>nirvana.conf
[root]$ ldconfig
The above code first navigates the required directory. It then creates a new file called nirvana.conf (this can be any file name with extension ".conf") containing the location of the libraries. Once this file is created, ldconfig is run (must be run as root) which creates the necessary links.
To compile a Universal Messaging C++ application, the location of the shared libraries must be known by the system as described above. The compiler must also know the location of certain C++ headers. These headers are found in cplus/include. The cplus/example directory contains sample applications written using the Universal Messaging C++ API as well as the make files which can be used to compile them. In order to compile your own applications, please refer to these makefiles as a template. Each application comes pre-compiled, the executable (no file extension) can be found in the application's directory (cplus/examples/applicationName).
Compiling the Sample Applications
Once the environment has been set up as described above, the sample applications can be compiled by navigating to the application's directory (cplus/examples/applicationName) and running:

[user@host channeliterator]$ make
To clean this directory so that the application can be recompiled, run:

[user@host channeliterator]$ make clean
The executable (no file extension) will now be present in the same directory as the source code after compilation.

Copyright © 2013-2015 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.