Universal Messaging 9.7 | 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 32-bit operating system.
The Universal Messaging C++ and POCO libraries can be found in the cplus\windows\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=C:\Universal Messaging 5.0.xxxx\cplus\windows\lib;%PATH%
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. The default location of the libraries is:
C:\Universal Messaging 5.0.xxxx\cplus\windows\lib;
where xxxx is the build number and 5.0 is the version number.
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, Universal Messaging.lib and certain C++ header files. The libs are located in cplus\windows\lib 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:

C:\Universal Messaging 5.0.xxxx\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:

C:\Universal Messaging 5.0.xxxx\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.