- Overview
- Building and Running the Demos on Linux and OS X
- Building and Running the Demos on Windows
- Building the Demo Apps for Universal Windows Platform (UWP)
This directory contains C++ sample programs for various Ice components. These examples are provided to get you started on using a particular Ice feature or coding technique.
Most of the subdirectories here correspond directly to Ice components, such as IceGrid, Glacier2, and so on. We've also included the following additional subdirectories:
-
Manual contains complete examples for some of the code snippets in the Ice manual.
-
Chat contains the C++ server, a command-line client, and a QT client for the ZeroC Chat Demo.
-
IceTouch contains iPhone demos for the Ice Touch SDKs.
The makefiles require GNU make 3.80 or later.
On OS X, the command-line demos require the Xcode Command Line Tools to be
installed (use xcode-select --install
to install them). The Ice Touch sample
programs require the Ice Builder for Xcode.
If you've installed Ice in a non-standard location, you'll need to set the
ICE_HOME
environment variable with the path name of the
installation directory:
export ICE_HOME=~/testing/Ice
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
:
make
To build the iOS examples, open IceTouch/demos.xcworkspace
in Xcode.
Before running a demo, make sure you've configured your environment to use Ice as described in the release notes.
If you've installed Ice in a non-standard location, you'll need to set
LD_LIBRARY_PATH
(Linux) or DYLD_LIBRARY_PATH
(OS X)
with the library directory of your Ice installation:
export LD_LIBRARY_PATH=$ICE_HOME/lib (Linux x86)
export LD_LIBRARY_PATH=$ICE_HOME/lib64 (Linux x64)
export DYLD_LIBRARY_PATH=$ICE_HOME/lib (OS X)
Refer to the README file in each demo directory for usage instructions.
The projects for the sample programs require the Ice Builder for Visual Studio. Add this extension to Visual Studio before opening the solution.
Open the solution file C++ demos.sln
to build the sample programs.
The demos are configure to use Ice distribution from Nuget packages, this packages are automatically downloaded during build. If you have disabled the automatic download of Nuget packages in Visual Studio you need to restore the packages before you build.
Packages can be restored from "Tools > NuGet Package Manager > Manage NuGet Packages for Solution..." command in Visual Studio.
After restoring the packages 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".
-
Build from command line:
-
Open a Visual Studio command prompt
cd ice-demos\cpp MSBuild /p:UseIceHome=yes /p:IceHome:<Ice dist path> "C++ demos.sln"
-
-
Build from Visual Studio
-
Open a Visual Studio command prompt
set UseIceHome=yes devenv
-
When Visual Studio starts set IceHome in Ice Builder options, "Tools > Options > Projects and Solutions > Ice Builder"
-
Disable automatic restoring of NuGet packages in Visual Studio from "Tools > Options > NuGet Package Manager"
-
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".
-
Before running a demo, make sure you've configured your environment to use Ice as described in the release notes.
Refer to the README file in each demo directory for usage instructions.
The projects for the sample programs require the Ice Builder for Visual Studio. Add this extension to Visual Studio before opening the solution.
UWP requires Windows 10 with Visual Studio 2015.
Open the solution file C++ demos (Universal Windows).sln
.
The demos are configure to use Ice distribution from Nuget packages, this packages are automatically downloaded during build. If you have disabled the automatic download of Nuget packages in Visual Studio you need to restore the packages before you build.
Packages can be restore from "Tools > NuGet Package Manager > Manage NuGet Packages for Solution..." command in Visual Studio.
After restoring the packages select your target configuration: Debug or Release, and platform Win32, x64 or ARM. Right click on the desired demo in the Solution Explorer window and select "Build".
-
Build from command line:
-
Open a Visual Studio command prompt
cd ice-demos\cpp MSBuild /p:UseIceHome=yes /p:IceHome:<Ice dist path> "C++ demos.sln"
-
-
Build from Visual Studio
-
Open a Visual Studio command prompt
set UseIceHome=yes devenv
-
When Visual Studio starts set IceHome in Ice Builder options, "Tools > Options > Projects and Solutions > Ice Builder"
-
Disable automatic restoring of NuGet packages in Visual Studio from "Tools > Options > NuGet Package Manager"
-
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".
-
Before running a demo, make sure you've configured your environment to use Ice as described in the release notes.
Refer to the README file in each demo directory for usage instructions.