I am using Unity to develop programs for MS Hololens2. Here, I am going to use OpenCV (C++ DLL) for image processing.
In Unity, I changed the platform to Universal Windows Platform (UWP) and built it, and installed the Windows SDK and Hololens2 emulator. In order to develop a library using OpenCV, a DLL was created with a Universal Windows dedicated DLL project (C++). At this time, OpenCV proceeded using World.dll released from the official website.
However, if the emulator calls a function in the DLL, it throws an exception saying that it cannot be loaded.
There is no problem with how to create and build a DLL project for OpenCV. Because when I tested it without using OpenCV, it worked without any problems. Therefore, I thought I had to rebuild OpenCV World.dll using CMake, and even though I tried various things, it still didn’t work.
Of course, the Unity project also included OpenCV World.dll and built it. (I tried to exclude it, but it still didn’t work)
I searched for materials related to cross-compiling and tried to repeat it, but I couldn’t do it properly.
Are there any resources to reference? How can I do it?
OS: Windows10 (x64)
Visual Studio: Visual Studio Community 2019