Installation
XAP’s c++ API supported on Linux and Windows 64bit machines. The current supported platforms and compilers are:
- Linux
- gcc.4.1.2
- Windows
- 64bit – VS 10.0 (Visual Studio 2010)
Installation
- Download the c++ API file that suits your platform.
- Unzip the file into your
<XAP Root>
directory (download GigaSpaces here), using your favorite unzip tool (.e.g WinZip). For example - On linux you should run the following to install the C++ libraries:
tar -xzvf gigaspaces-cpp-12.0-ga-linux-amd64-gcc-4.1.2.tar.gz
Where the gigaspaces-cpp-9.X.X-ga-linux-amd64-gcc-4.1.2.tar.gz
should be located at the /gigaspaces-xap-premium-9.X.X-ga
folder.
- After unzipping the ZIP file, you should have the following files and folders under your
<XAP Root>\cpp
folder:
Setting the Environment
There are several environment settings that are necessary to build and run the examples that come with this package. This section lists these settings. Choose the tab below that matches your platform.
Environment Variables
The following environment variables need to be defined:
XAP_HOME
– the<XAP Root>
directory.PLATFORM
– the build platform, in this case win32 or win64.COMPILER
– the compiler used for building, for example: VS9.0.PATH
– This should include the compiler folder , GigaSpaces gsxml2cpp location and the jvm.dll location
For example:
set XAP_HOME=C:\gigaspaces-xap-premium-12.0.0-ga-b16000
set PLATFORM=win32
set COMPILER=VS9.0
In addition, for windows 32 bit the PATH
variable should be updated to include:
%XAP_HOME%\cpp\lib\%PLATFORM%\%COMPILER%;%XAP_HOME%\cpp\bin\%PLATFORM%\%COMPILER%;%JAVA_HOME%\jre\bin\client
For windows 64 bit the PATH
variable should be updated to include:
%XAP_HOME%\cpp\lib\%PLATFORM%\%COMPILER%;%XAP_HOME%\cpp\bin\%PLATFORM%\%COMPILER%;%JAVA_HOME%\jre\bin\server
Environment Script Files
If you don’t want to set these variables globally (by defining System Variables) then the GigaSpaces C++ package includes the following script files that help set the environment:
<XAP Root>\cpp\env.cmd
– Running this file defines these variables to match your platform.<XAP Root>\cpp\GigaVisualStudio.bat
– Running this file starts Visual Studio and automatically sets the environment.
You might need to edit these files to include the correct values for the
PATH
, JAVA_HOME
and XAP_HOME
environment variables and the correct location of Visual Studio and the jvm.dll.Environment Variables
The following environment variables need to be defined:
XAP_HOME
– the<XAP Root>
directory.PLATFORM
– the build platform, in this case linux-amd64 or linux32.COMPILER
– the compiler used for building, for example: gcc-4.1.2.
Example:
XAP_HOME=../../..
PLATFORM=linux-amd64
COMPILER=gcc-4.1.2
Environment Script Files
If you don’t want to set these variables globally the GigaSpaces C++ package includes the following script file that help set the environment:
<XAP Root>/cpp/setenv.sh
– Running this file defines these variables to match your platform.
Testing the Installation
The package provides the following scripts (placed in <XAP Root>\cpp
):
- sanity – Run sanity tests on embedded, remote and partitioned space
- runBenchmark – Run benchmark tests on embedded space
- runTest – Run all functional tests on embedded space
- testJiniTransactions – Run benchmark and functional tests on partitioned space using Jini Mahalo transactions
Result files can be found in <XAP Root>\cpp
:
benchmarkResult*.txt
– Benchmark tests results
testResult*.xml
– Functional tests results
Server installation
When installing XAP on a server the following package needs to be installed according to your version:
Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)
Microsoft Visual C++ 2008 SP1 Redistributable Package (x64)
Microsoft Visual C++ 2010 SP1 Redistributable Package (x86)
Microsoft Visual C++ 2010 SP1 Redistributable Package (x64)