Table of Contents

Run EasyAR Windows samples

This article introduces how to run the native Windows samples provided by EasyAR. HelloARQt is used as an example here to introduce how to run a sample. You can refer to this article for how to use other samples.

Preparation

  • Before you begin, make sure the following 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 (Qt samples)
    • (USB) camera, connected and working properly.
  • Download EasyAR Sense native samples and unzip them

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

Note

Make sure the C++ support libraries of Visual Studio have been installed. These are not installed automatically in the default Visual Studio installation.

Compile and run EasyAR Windows samples

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

  1. Open CMake, specify the where is the source code directory as the downloaded and unzipped sample directory, and set the path for binary files.

  2. Click Configure. In the pop-up window, select the system's Visual Studio version. If some paths (such as Qt) are not automatically set and an error is reported, modify them manually and Configure again until there are no errors.

    sample1

  3. Click Generate to generate project files.

    sample2

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

    sample3

  5. Click Run in Visual Studio. In the input box of the running window, fill in the License Key obtained from the official website, and click Start to run the sample.

    sample4

FAQ

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

  2. The HelloARQt described above enters the License Key at runtime, but some samples need the license to be filled in before running, usually at the initialize code, such as the HelloAR sample where the License is filled in main.cc.

    sample5