Table of Contents

Run EasyAR Windows Samples

This article introduces how to run the native Windows samples provided by EasyAR. Here, we use HelloARQt as an example to explain how to run the samples. The methods for other samples can be referred to this article.

Preparation

  • Before starting, ensure the following items are prepared:

    • 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 working properly.
  • Download the EasyAR Sense native samples and extract them.

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

Note

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

Compile and run EasyAR Windows samples

The following uses HelloARQt as an example to explain how to compile and run the official EasyAR Windows samples.

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

  2. Click Configure. In the pop-up window, select the system's Visual Studio version. If certain paths (e.g., Qt) are not automatically set and errors occur, manually modify them and click Configure again 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. In Visual Studio, click Run. Enter the License Key obtained from the official website in the input box of the running window, then click Start to run the sample.

    sample4

Common issues

  1. If the runtime prompts that Qt cannot be found, the solution is to add the Qt path to the PATH environment variable, then log out and log back into the computer.

  2. The HelloARQt example described above requires entering the License Key during runtime, but some samples require the License to be filled in before running, usually in the initialize code. For example, the License for the HelloAR sample is filled in main.cc.

    sample5