title: How to compile OpenCV 3.4 with Visual Studio 15 2017 ARM for UWP?
body: <p>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.</p>
  
  <p>I started my journey from here:</p>
  
  <blockquote>
    <p><a href="https://developer.microsoft.com/en-us/windows/iot/samples/opencv" rel="nofollow noreferrer">https://developer.microsoft.com/en-us/windows/iot/samples/opencv</a></p>
  </blockquote>
  
  <p>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.</p>
  
  <p>x86/x64 compilation was very easy, in fact, and I could achieve it just by following this guide:</p>
  
  <blockquote>
    <p><a href="https://stackoverflow.com/questions/43786856/how-to-can-i-install-configure-opencv3-2-0-with-visual-studio-2017">How to can I install/configure OpenCV3.2.0 with Visual Studio 2017?</a></p>
  </blockquote>
  
  <p>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:</p>
  
  <p><a href="https://i.stack.imgur.com/1IJrI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1IJrI.png" alt="CMake Error: Error in configuration process, project files may be invalid."></a></p>
  
  <p>By following a couple of posts here:</p>
  
  <blockquote>
    <p><a href="https://github.com/cppan/cppan/issues/23" rel="nofollow noreferrer">https://github.com/cppan/cppan/issues/23</a></p>
  </blockquote>
  
  <p>I was able to ultimately manage to create a Visual Studio ARM solution. After using:</p>
  
  <blockquote>
    <p>cmake -G "Visual Studio 15 2017 ARM" ..</p>
  </blockquote>
  
  <p>with no luck, I tried:</p>
  
  <blockquote>
    <p>cmake -G "Visual Studio 15 2017 ARM" -DCMAKE_SYSTEM_NAME=WindowsStore
    -DCMAKE_SYSTEM_VERSION=10.0 ..</p>
  </blockquote>
  
  <p>which, apparently, worked in creating a Visual Studio 2017 solution meant to be compiled for ARM.</p>
  
  <p>Anyway, after a long compile time, this is what I got:</p>
  
  <p><a href="https://i.stack.imgur.com/8DAa2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8DAa2.png" alt="4824 errors in Visual Studio OpenCV ARM compiling"></a></p>
  
  <p>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.</p>