2

I have been struggling to compile OpenCV 3.4 for a couple of days now. Final target of the compile is ARM, since I am currently writing an UWP for Windows 10 IoT Core running on Raspberry Pi 3.

I started my journey from here:

https://developer.microsoft.com/en-us/windows/iot/samples/opencv

where Microsoft provides on GitHub an old OpenCV Version (3.0.0) with all the Visual Studio solutions already configured for ARM, x86 and x64.

x86/x64 compilation was very easy, in fact, and I could achieve it just by following this guide:

How to can I install/configure OpenCV3.2.0 with Visual Studio 2017?

My problem is now down to only ARM compiling - since CMake will return this nice error when used with "Visual Studio 15 2017 ARM" compilers:

CMake Error: Error in configuration process, project files may be invalid.

By following a couple of posts here:

https://github.com/cppan/cppan/issues/23

I was able to ultimately manage to create a Visual Studio ARM solution. After using:

cmake -G "Visual Studio 15 2017 ARM" ..

with no luck, I tried:

cmake -G "Visual Studio 15 2017 ARM" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 ..

which, apparently, worked in creating a Visual Studio 2017 solution meant to be compiled for ARM.

Anyway, after a long compile time, this is what I got:

4824 errors in Visual Studio OpenCV ARM compiling

At this point, I have tried running the whole procedure again on different PCs and also by trying to repair Visual Studio, ultimately getting the very same outcome.

Guido Magrin
  • 551
  • 3
  • 7
  • 20
  • 1
    look at the project file that MS provides for 3.0 and modify it for 3.4 – magicandre1981 Dec 30 '17 at 18:51
  • thanks for your input @magicandre1981 but I can't imagine doing what you are suggesting, since OpenCV 3.4 changed many dependencies and probably "manual rewire" is not the most efficient way - given how we'll soon get a new OpenCV version that's will surely add new features and so on – Guido Magrin Dec 30 '17 at 22:06
  • 2
    Note that compiling for Windows on ARM is not the same as compiling for UWP. If you successfully compile for ARM in the way you are attempting, it will run as a native binary on Windows on an ARM device, but will not be a UWP application. I am sorry that this is not more helpful. Your best bet, right now, is to either manually "rewire" the 3.0 solution that MS provides, or start a conversion for 3.4 manually, following the same basic steps that MS took to create their 3.0 solution. – Naikrovek Jan 02 '18 at 12:13

0 Answers0