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
.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 working properly.
- Visual Studio 2022 or later (for samples with
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.
Open CMake, set the
where is the source codedirectory to the extracted sample directory, and specify the path for binary files.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 clickConfigureagain until no errors remain.
Click
Generateto create the project files.
Click
Open Projectto open the project in Visual Studio.
In Visual Studio, click Run. Enter the License Key obtained from the official website in the input box of the running window, then click
Startto run the sample.
Common issues
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.
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
initializecode. For example, the License for the HelloAR sample is filled inmain.cc.