Table of Contents

Run EasyAR Windows samples

This article introduces how to run the native Windows samples provided by EasyAR. Taking HelloARQt as an example, it explains how to run the sample. Other samples can be referenced similarly.

Preparations

  • Before starting, ensure you have prepared the following:

    • Visual Studio 2022 or later (for samples with .vcxproj projects)
    • CMake 3.8 or later (for samples with CMakeLists.txt)
    • Qt 5.4 or later (for Qt samples)
    • A (USB) camera plugged in and functioning properly.
  • Download EasyAR Sense native samples and extract them.

  • Obtain a License Key from the EasyAR Developer Center (Chinese site / English site).

Note

Ensure the C++ support libraries for Visual Studio are installed, as these are not automatically included in the default Visual Studio installation.

Compile and run EasyAR Windows samples

The following uses HelloARQt as an example to demonstrate compiling and running EasyAR official Windows samples.

  1. Open CMake, set the where is the source code directory to the extracted sample directory, and specify the binary file path.

  2. Click Configure. In the pop-up window, select your system’s Visual Studio version. If certain paths (e.g., Qt) are not automatically set and cause errors, manually modify them and re-run Configure until no errors remain.

    sample1

  3. Click Generate to create the project files.

    sample2

  4. Click Open Project to open the project in Visual Studio.

    sample3

  5. Run the project in Visual Studio. Enter the License Key obtained from the official website in the input box and click Start to run the sample.

    sample4

Common issues

  1. If Qt is not found during runtime, add the Qt path to the PATH environment variable, then log out and log back in.

  2. The HelloARQt sample requires entering the License Key during runtime. However, some samples require filling in the license before running, typically in the initialize code. For example, the HelloAR sample's license is set in main.cc.

    sample5