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
.vcxprojprojects) - 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.
- Visual Studio 2022 or later (for samples with
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.
Open CMake, set the
where is the source codedirectory to the extracted sample directory, and specify the binary file path.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-runConfigureuntil no errors remain.
Click
Generateto create the project files.
Click
Open Projectto open the project in Visual Studio.
Run the project in Visual Studio. Enter the License Key obtained from the official website in the input box and click
Startto run the sample.
Common issues
If Qt is not found during runtime, add the Qt path to the PATH environment variable, then log out and log back in.
The HelloARQt sample requires entering the License Key during runtime. However, some samples require filling in the license before running, typically in the
initializecode. For example, the HelloAR sample's license is set inmain.cc.