Universal Messaging 10.3 | Developer Guide | Enterprise APIs | Enterprise Developer's Guide for C++ | C++ Prerequisites | Environment Setup: Windows
 
Environment Setup: Windows
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.
Note:
Setting up the environment involves the use of the command prompt at the operating system level. General information about using the command prompt for this purpose is contained in the section Running the Sample Applications.
The Universal Messaging C++ and POCO libraries can be found in a platform-specific directory under the <InstallDir>\UniversalMessaging\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:
set PATH=<InstallDir>\UniversalMessaging\cplus\lib\x86_64;%PATH%
where <InstallDir> 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
In order to make compilation easier, we have provided a CMake script which can be used to generate the build files for the target platform. CMake can be downloaded from http://www.cmake.org/cmake/resources/software.html.
In the following descriptions, "[AppName]" refers to the name of the application you want to compile. The source code of the sample applications is available at the location:
<InstallDir>/UniversalMessaging/cplus/examples/
On Windows, the Universal Messaging C++ libraries have been compiled using CMake and Microsoft Visual Studio 2015. To get the required environment for CMake you will need to run the Microsoft Visual Studio 2015 command prompt available via the "Visual Studio Tools" folder.
Windows 64 bit
Use the following commands at the Visual Studio 2015 command prompt:
1. cmake -Wno-dev -G "Visual Studio 14 Win64"
2. cd [AppName]
3. msbuild /p:Configuration=Release;PlatformType=x64 [AppName].sln
4. set PATH=%PATH%;[Location_Of_UM_Install]\cplus\lib\x86_64
5. Release\[AppName].exe