/>

### RCFProto C++ Demo

This section describes how to build and run the RCFProto C++ demo server and client, on Windows, using Visual Studio. You will need the Win32 binary distribution to follow these steps.

##### Prerequisites

- Download and unzip Boost to a local directory, e.g. `C:\boost_1_49_0`.
- Download and unzip Protocol Buffers to a local directory, e.g. `C:\protobuf-2.4.1`
- Build `libprotobuf.lib`, by opening protobuf.sln (e.g. `C:\protobuf-2.4.1\vsprojects\protobuf.sln`) in Visual Studio and building the libprotobuf project. Make sure you use the same version of Visual Studio that you will use to build RCFProto.

##### Visual Studio Solution

From Visual Studio, open `cpp\vs2008\demo\RCFProtoDemo.sln`. If you are using a Visual Studio version newer than Visual Studio 2008, you will be prompted to upgrade the solution. The demo solution contains three projects (DemoClient, DemoServer and RCFProto):
Projects in the solution

##### Build Settings

- Before building the solution, make sure the include directories and library directories for all 3 projects, match your own installation paths for Boost and Protocol Buffers.
- The include directories for each project must include Boost (e.g. `C:\boost_1_49_0`) and Protocol Buffers (e.g. `C:\protobuf-2.4.1\src`).
- The library directories for each project must include the path to `libprotobuf.lib` (e.g. `C:\protobuf-2.4.1\vsprojects\Debug`).
- Include directories and library directories are configured in the Visual Studio project properties:
  Configuring Additional Include Directories (Boost and Protocol Buffers)
  Configuring Additional Library Directories (Protocol Buffers)

##### Building

To build, right click on the solution in Visual Studio and press Build. A pre-build event will run protoc.exe to generate `Demo.pb.cc` (containing source code for Protocol Buffer messages), and the projects will then be built. Your output window should look similar to this:
Output on successful build

##### Running the C++ demo server and client

- From the root directory of the distribution, cd to the build output location:
`cd cpp\demo\vs2008\Debug`
- Run the demo server:
`DemoServer.exe`
- Run the demo client (in a different command prompt):
`DemoClient.exe`