User manual
Version: v4.5.2
8 if (NOT (MSVC AND MSVC_VERSION LESS 1900))
9 # Using the C++ API
10 add_executable(test_sample_c++ test_sample_advanced.cpp)
11 target_link_libraries(test_sample_c++ Atracsys::AdvancedAPI)
12 endif ()
Listing 8.5: Example of linking against the C and C++ APIs.
The CMakeLists.txt le will be looking for the shared libraries in the SDK installation folder. In order
to deploy an application built using the SDK, the device64 and fusionTrack64 shared libraries must be
distributed as well.
8.5.1 Windows compilation
The cmake command from the cygwin environment won’t work, as it will use Unix-like pathes, which are
not understandable by Visual Studio.
The procedure using Visual Studio is the following:
1. Create an empty build directory (in which le can be written) and open a terminal in this directory (either
cmd or PowerShell);
2. From the aforementioned terminal, run cmake -G <generator_string> [-A x64] <path_to_the_sample_director
> command. Valid examples are
1 cmake -G "Visual Studio 15 2017 Win64" "C:\ Program Files \Atracsys \ fusionTrack SDK\
samples "
2 cmake -G "Visual Studio 16 2019 " -A x64 "C:\ Program Files \Atracsys \ fusionTrack SDK\
samples "
3. Open the samples.sln solution and compile.
8.5.2 Unices compilation
A build system (e.g. GNU make, Ninja) is also needed on top of cmake and a compatible compiler.
The procedure is the following:
1. Untar the SDK tarball:
1 % tar xJvf fusionTrack_SDK -[...]. tar .xz
2. Create a build directory and enter it:
1 % mkdir build
2 % cd build
3. Run cmake and compile, using the GNU Make build system:
1 % cmake -G "Unix Makefiles" - DCMAKE_BUILD_TYPE =Release ../ fusionTrack_SDK -[...]/ samples
2 %make -j <number_of_cpu >
or with the Ninja build system:
1 % cmake -G "Ninja" - DCMAKE_BUILD_TYPE =Release ../ fusionTrack_SDK -[...]/ samples
2 % ninja
Atracsys / 2020-06-17 / 16:48:00 64 / 113