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
Estimated time to complete: 30 minutes
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.
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.
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:
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:
Now, we need to adjust the project settings to include the directory from which we just added the binding files:
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.
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.
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.