Build the Sample Application#

The sample application demonstrates the SDK APIs and is hosted on GitHub.

This sample includes the source file effects_demo.cpp, which you can compile and run along with CMake scripts to automatically find the required dependencies.

Clone the repository to your local machine either by using the download_samples.ps1 script in the core SDK package or by manually cloning the repository using GitHub Desktop or Git Bash.

If the sample application and core package reside in different locations, you must set the AFX_SDK_ROOT environment variable to the path of the core package.

To build the sample application, follow these steps:

  1. Start the CMake GUI and specify the source folder and a build folder for the binary files.

    1. For the source folder, ensure that the path ends in package.

    2. For the build folder, ensure that the path ends in package/build.

  2. Use CMake to configure and generate the Visual Studio solution file.

    1. Click Configure.

    2. When prompted to confirm whether CMake can create the build folder, click OK.

    3. To enable CMake to locate the CUDA compiler, select Visual Studio for the generator and x64 for the platform.

    4. To finish configuring the Visual Studio solution file, click Finish.

    5. To generate the Visual Studio solution file, click Generate.

  3. Use Visual Studio to generate the application binary (.exe) file from the solution file that was generated in the previous step.

    1. In CMake, click Open Project to open Visual Studio.

    2. In Visual Studio, select Build > Build Solution.