using cpp - Innovatiehuis/AR_IBT_Wiki Wiki

This chapter describes everything you need to now about building and using C++ libraries as a plugin in unity. If you do not want to make a new libary, and instead add on to one of the already existing ones, skip to Implement Functions. If you want to know more about C++ libraries, and why to use them in this project, read C++ libraries.

Installing requirements

In order to use this plugin with OpenCV there are a few steps that has to be made. First of all, the VCPKG package manager has to be installed. The instructions for this installation can be found here. Once installed, the following two commands should be exectuted in the installation folder:

./vcpkg.exe integrate install

./vcpkg.exe install opencv:arm64-uwp

Making a new C++ library

// UWP dll project maken // library code // compilen voor architectuur // (werkt x64 wel? test dit)

Implement functions

// Code om functies te schrijven

Build the library

After vcpkg and the opencv:arm64-uwp package is installed, in Microsoft Visual Studio, which is an UWP project, it is possible to import the OpenCV functions. When the project is build this will result in a few .dll files. These files should be included in the Unity project. This is described in the next chapter.

Please note that you have to build the project, not the solution (or using the shortcut Crtl+b).

Import in unity

// unity code om library functies te gebruiken

Suggestions

// waarom niet g++ compilen

⚠️ **GitHub.com Fallback** ⚠️