Universal Messaging 9.8 | Universal Messaging Developer Guide | Enterprise APIs | Enterprise Developer's Guide for C++ | Prerequisites | Environment Setup : Windows
 
Environment Setup : Windows
Once Universal Messaging has been installed, the sample applications can be run from the "C++ Examples Command Prompt". The guide below explains how the Universal Messaging C++ environment can be set up for compiling and running the applications on a Windows operating system.
The Universal Messaging C++ and POCO libraries can be found in a platform-specific directory under the cplus\lib directory. In order to run Universal Messaging C++ applications, the location of these libraries must be known to the system. There are several methods which can be used to achieve this:
1. By updating the PATH environment variable in the command prompt used to compile or run code:

C:\> set PATH=<UM_Install_Dir>\cplus\lib\x86_64;%PATH%
where <UM_Install_Dir> is the root folder of the Universal Messaging installation.
This will allow you to run applications in the current command prompt.
2. In order to update the PATH globally, you need to:
*Open System in the Control Panel.
*Expand the "Advanced" tab and click the button labelled "Environment Variables"
*In the new window, the Path variable is found in the "System Variables" section. Highlighting the variable and clicking "edit" will open another window.
*In this new window you should append the location of the libraries to the beginning of the "variable value" section.
3. Another way to make the libraries globally available is to copy them into the Windows System32 folder located at:
C:\WINDOWS\System32
This directory is looked in by default for Runtime libraries.
To compile applications, the compiler will need to know the location of the POCO lib files, Nirvana.lib and certain C++ header files. The location of the libs is described above, and the headers are located in cplus\include. The cplus\examples directory contains the source code for several sample applications as well as project files (.vcproj) which can be opened with Microsoft Visual Studio. Each application comes pre-compiled, the executable (.exe) 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 built by either opening the application's project file in Microsoft Visual Studio or by running vcbuild. In order to use vcbuild, either run the Microsoft Visual Studio command prompt and ensure that the Universal Messaging environment is set up, or run vsvars32.bat in a command prompt:

C:\> "C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat"
The environment will now be set up for running vcbuild. In order to compile an application, navigate to the application's directory and run:

<UM_Install_Dir>\cplus\examples\channeliterator> vcbuild
This will compile the application in a new folder called Release. To clean this directory so that the application can be recompiled, run:

<UM_Install_Dir>\cplus\examples\channeliterator> vcbuild /clean
After compilation the executable (.exe) will be present in a folder called Release found in the same directory as the source code for the application.

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.