Test SolAR

We provide you a bundle to test our samples code. It’s just a .zip file including SolAR’s .dlls and an .exe file.

Table 1. Available Samples

Natural Image Marker

download link

Fiducial Marker

download link

 SLAM

download link

Triangulation

download link

Print the marker included in .zip file to use it during the test.

Install development environment

The SolAR framework uses a dedicated pipeline for linking and compiling code as well as internal tools for third party downloads that should make your job a lot easier. As you will see later, the SolAR framework is based on QMake originally created by the Qt Company, but compliant with most IDE including Visual Studio.

Install your IDEs

Visual Studio

You will have to install Visual Studio to install the corresponding compiler and debugger on your machine. The community version 2017 has been tested and is available on the following link: Visual Studio installer

We recommand to install at least the following features:

  • Desktop Development C++

  • Game development with Unity (useful to develop and debug Unity applications)

  • Mobile development in C++ (to build for Android)

QT Creator

As SolAR is using QMake file to setup the projects, we highly recomment to install Qt Creator. Moreover, you will have access to wizards which will help you create new SolAR modules, components and pipelines.

Download the last version of QTCreator on the following link: QT installer download

When downloaded, run the Qt Installer

Create a Qt account if not already done, select where you want to install Qt. You don’t need to install Qt SDK, just the Qt Creator. So just check the following components:

  • Qt x.x.x (last version proposed)

    • with MSVC 2017 64-bit

    • Android (if you want to build SolAR for Android)

  • Developer and Designer Tools

    • Qt Creator x.x.x CDB Debugger Support

    • Debugging Tools for Windows

and start the installation.

QT Visual Studio Tool

If you are more comfortable with Visual Studio, you will have to install the Visual Studio plugin called QT Visual Studio Tool which will allow you to open Qt projects. To do so, Open Visual Studio, click on Tools menu, then on Extensions and Updates. Search for Qt Visual Studio Tools, and install it. To complete this installation, you have to restart Visual Studio.

Install dependencies

For downloading dependencies, the SolAR framework uses the meta dependencies management tool Remaken supporting Conan, VCPKG and its native C++ packaging structure based on pkg-config description files.

So start by downloading and installing Remaken available on the following link: Remaken installer

Start the remaken installer. By default, the dependencies will be installed in your ${USER_HOME} directory, but you can change it by setting another location for your REMAKEN_PKG_ROOT environement variable. By default, Remaken will install Conan and pkg_config which will be used afterwards.

Then, open a command prompt with administrator rights and run:

remaken init

This command will install the qmake building rules in your ${USER_HOME}/.remaken/rules folder.

Remaken is compatible with Conan. As Conan will use CMake ot build your third parties, you will need to install it before using Remaken by launching the installer available here.

Remaken uses a file called packagedependencies.txt to describe which depedencies to install, in which version, where to install them, and where to download them.

A global packagedepedencies.txt is available in the parent GIT repository SolAR, and can be downloaded on the following link: packagedependencies.txt

Copy this file where you want on your computer, open a command prompt in the folder where you have copied the packagedependencies.txt file, and run remaken with the following command:

remaken install --cpp-std 17 -b cl-14.1 packagedependencies.txt

This command will install all SolAR dependencies in release mode in your ${REMAKEN_PKG_ROOT} folder. To download the dependencies in debug mode, run the following command:

remaken install --cpp-std 17 -b cl-14.1 -c debug packagedependencies.txt

This is done, all your dependencies are downloaded and ready to use !

Some of the module will download and build third parties using Conan which requires CMake. Install the last version of CMake (minimum version 3.11) on the following link. Do not forget to check "Add CMake to PATH environment variable" during its installation.

Build SolAR

Clone SolAR

SolAR is made up of a multitude of projects (SolAR Framework, SolAR pipeline manager, modules, samples, etc.). To help you, we have created a parent repository with sub-modules regrouping all source codes of SolAR. You can clone it from the following url: https://github.com/SolarFramework/SolAR.git

No space in the path of the folder where you are cloning SolAR !
git clone https://github.com/SolarFramework/SolAR.git

Do not forget to install and update recursively the submodules:

cd SolAR
git submodule update --init --recursive

If you want to move all submodules on Master, launch the following command

git submodule foreach git pull origin master

If you do not want to download all the source codes of SolAR, you can have a look to the different repositories available on Github on the Community/Git page.

Build on Qt Creator

Open the Qt project of your choice, for instance a sample. Check by clicking on the Projects tab, and then on the Manage Kits…​ button that your QT MSVC2017 64bit kit is well configured (Microsoft Visual C++ Compiler should be in version 15.x.x.x (x86_amd64) if your are using Visual Studio 2017).
Select Release or Debug compiler depending on the previous dependencies downloaded. Just run qmake, and build your project (no need to add an qmake install step).

Build on Visual Studio

You have first to set the path of Qt for Qt Visual Studio Tool. Click on the Qt Vs Tools tab, and then on Qt Options. Add a new Qt Version (for instance name: 5.14.1 MSVC207_64, path: C:\Qt\5.14.1\msvc2017_64).
When this is done, simply open a Qt project by cliking on the Qt VS Tools tab, and on Open Qt Project File (.pro). Select the Qt project of your choice, then build your project. It’s done!

Q&A

Conan Error when installing dependencies: PermissionError: [WinError 5]

Some Conan recipes are renaming the unzipped folders embedding the source code of the dependence as soon as they are downloaded locally. Unfortunately, your antivirus or the Windows Search Indexing can lock it. We recommend to deactivate Windows Search Indexing on Conan folders, and check your antivirus to avoid any control after unzipping the conan package. If you have still a problem, you will have to add time.sleep() before renaming your unzipped folder in your problematic conan recipes (see the following thread for more details: https://github.com/conan-io/conan/issues/5205).

Remaken does not work

Be sure to install, init and use Remaken from a command prompt with admin rights. You can check that cmake and pkg-config are well installed with the following command

choco list -l

you can also test if you can access remaken thrid parties by running the three following commands:

cmake -version
pkg-config --version
conan -v

If not, check that the path of their executables has to be added to the PATH environment variable.