Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
DataStorm C++ demos.sln

C++ Demos


This directory contains C++ sample programs for DataStorm. These examples are provided to get you started on using a particular DataStorm feature or coding technique.

Building and Running the Demos on Linux and macOS


The makefiles require GNU make 3.80 or later.

On macOS, the command-line demos require the Xcode Command Line Tools to be installed (use xcode-select --install to install them).

If you've installed DataStorm in a non-standard location or want to use the source tree build, you'll need to set the DATASTORM_HOME environment variable with the path name of the installation directory or source tree:

export DATASTORM_HOME=~/testing/datastorm

Building the Demos

Review the settings in make/Make.rules. For example, set OPTIMIZE=yes to build with optimization.

When you're ready to start the build, run make, for example:

make V=1

V=1 in the example above turns on verbose output.

The clean and distclean targets allow you clean all the demos. clean removes the binary files created by the build; distclean removes all these files plus the C++ files generated by slice2cpp.

Note that make clean only removes the binary files for the configuration and platform specified with the CONFIGS and PLATFORMS variables in Make.rules.

You can also build or clean a single demo with make <demo-path>[_clean|_distclean], for example:

make V=1 stock
make stock_distclean

Running the Demos

Refer to the file in each demo directory for usage instructions.

Building and Running the Demos on Windows


Visual Studio 2017 users need to either:

  • install the Windows 10 SDK (10.0.14393.0) component using the Visual Studio 2017 installer, or
  • retarget the solution to a version of the Windows 10 SDK already installed (using Project > Retarget solution)

Failure to perform this step results in error MSB8036 when building any project:

The Windows SDK version 8.1 was not found. Install the required version of Windows SDK
or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution".

Building the Demos

Open the solution file DataStorm C++ demos.sln to build the sample programs.

The demos are configured to use the DataStorm NuGet package provided by ZeroC. The build downloads automatically this DataStorm NuGet package.

If you have disabled the automatic download of NuGet packages by Visual Studio, you need to restore the packages before you build using Tools > NuGet Package Manager > Manage NuGet Packages for Solution... in Visual Studio.

Then select your target configuration (Debug or Release) and platform (Win32 or x64). Right click on the desired demo in the Solution Explorer window and select Build.

Running the Demos

You need to add the DataStorm and Ice bin directories to your PATH before running the demos.

If you are building Debug, add the Debug bin directories with a command similar to:

set PATH=%USERPROFILE%\datastorm\demos\cpp\packages\zeroc.datastorm.v140.0.1.0\build\native\bin\x64\Debug;%USERPROFILE%\datastorm\demos\cpp\packages\\build\native\bin\x64\Debug;%PATH%

If you are building Release, add the Release bin directories with a command similar to:

set PATH=%USERPROFILE%\datastorm\demos\cpp\packages\zeroc.datastorm.v140.0.1.0\build\native\bin\x64\Release;%USERPROFILE%\datastorm\demos\cpp\packages\zeroc.icev140.3.7.1\build\native\bin\x64\Release;%PATH%

Then refer to the file in each demo directory for usage instructions.