User Tools

Site Tools


tutorials:cpp_open_frameworks:getting_started_1_hello_world



Getting Started I (Hello World)

Introduction

This tutorial includes all of the steps required to include GestureWorks Core in your C++ project. This will include downloading and unpacking GestureWorks, creating a Visual Studio project, linking in the GestureWorks files, and setting project directories for compilation. We will also discuss other options for developing with GestureWorks. Note that this process is valid for any C++ project involving GestureWorks and is not limited to any particular C++ framework. For this tutorial you will need the GestureWorks Core multitouch framework; a free trial is available.

NOTE: This tutorial applies to GestureWorks Core development in all third-party C++ development environment such as openFrameworks and Cinder.

Download the code for all of the C++ & openframeworks multitouch tutorials here:tutorials_cpp_openframeworks.zip
Download the code for all of the C++ & Cinder multitouch tutorials here: tutorials_cpp_cinder.zip


Requirements

  • GestureWorks Core License
  • Microsoft Windows 7, 8, or 10
  • Microsoft Visual Studio (2012, 2013 or 2015, Community or Professional - 2012 required for openFrameworks)
  • Multitouch display device

Process Overview

Process Detail

1. Download and install software prerequisites

Microsoft Visual C++ 2012 Express, 2013 or 2015 Community must be downloaded and installed prior to continuing with the tutorial.

Note that the Professional versions of these IDEs will also work.

2. Download and install GestureWorks Core package

The GestureWorks Core installer package – GestureWorksCoreSetup.exe – contains the main GestureWorksCore.dll files (the “native” DLLs), various bindings (C++ .NET, Python, etc.), and supporting documentation. GestureWorks Core must be licensed prior to use in any software project.

  1. Download the GestureWorks Core Trial package from here.
  2. Double-click the downloaded installer package GestureWorksCoreSetup.exe to install GestureWorks Core. GestureWorks Core consists of the GestureWorks Core DLLs as well as various tutorials, bindings, and documentation.

GestureWorksCore*.dlls
\GestureWorksCore\GestureWorksCore32.dll
\GestureWorksCore\GestureWorksCore64.dll

C++ bindings
\GestureWorksCore\bindings\c++

C++ tutorials
\GestureWorksCore\bindings\c++\tutorials

3. Create a new C++ solution in Visual Studio

Microsoft's Visual Studio makes it quick and easy to begin writing applications making use of the Windows API.

First, create a new solution in Visual Studio 2013:

  1. Click File → New Project
  2. Under Installed Templates, click Visual C++
  3. Click Empty Project
  4. Name the solution “Project1”
  5. (optional) Click Browse… to select a location for the solution folder
  6. Click Create directory for solution
  7. Click OK

4. Add GestureWorks Core C++ bindings to solution

Next, there are four files that need to be added to the solution.

Right-click on the source files for Project1 in the Solution Explorer, then click Add → Existing Item

Browse to the folder containing the downloaded GestureWorks Core C++ bindings. Select GestureWorksCore.cpp, GWCUtils.cpp, and their corresponding header files. Click the Add button.

All of the required files for using GestureWorks should now be in your solution:

5. Compiler Settings

Now, we need to adjust the project settings to include the directory from which we just added the binding files:

  1. Right-click and select Properties under Project1
  2. Select VC++ Directories under the Configuration Properties tab
  3. In the Include Directories row, click the right column, and select Edit from the drop-down menu.

From here, click the folder button to add a new line. You can now either copy and paste or browse to the directory that contains the bindings files (default is \GestureWorksCore\bindings\c++). Add this directory, click ok, and exit the dialog.


Review

In this tutorial we installed GestureWorks Core and the prerequisites for developing with the GestureWorks Core C++ bindings, and created a solution that includes the C++ bindings code. From here we move on to C++ & Cinder: Getting Started II (Hello Multitouch) or C++ & openFrameworks: Getting Started II (Hello Multitouch) in which we dig into actual source code, initializing GestureWorks Core and working with touch and gesture event data.


Other Development Options

Use of the C++ bindings for GestureWorks Core is not limited to Visual Studio; the same steps followed here can be used with any IDE or build solution supporting C++ development.


Next tutorial:

2015/09/04 17:02 · glass
tutorials/cpp_open_frameworks/getting_started_1_hello_world.txt · Last modified: 2019/01/21 19:24 (external edit)