0

I am trying to build OpenCV from source using CLion with MinGW on Windows 10. Unfortunately the provided builds for OpenCV do not include a MinGW build any more.

When compiling, I get an error that strsafe.h is missing, although I have Windows SDK and Visual Studio 2015 C++ tools installed.

Has anyone tried building OpenCV on the same setup?

Tanks!

Nikolay Arhangelov
  • 1,292
  • 3
  • 13
  • 21

2 Answers2

0

Yes, I have recently succesfully built OpenCV 3.0 on Windows 10 and 7 using MinGW-w64 for use with CLion.

Suggestions, based on my experience:

  • Use latest MinGW or MinGW-w64. Older versions have some quirks with supporting C++11 standart and being compatible with Win stuff at the same time, and I was not able to built OpenCV as a result
  • Use latest OpenCV version. I had some problems when trying to compile older releases (for example OpenCV 3.0 BETA)
  • Disable IPP. For some reason it doesn't compile with MinGW, and I was not motivated enough to find out why.

Of course, you have to ensure that correct MinGW is being hooked up during build (in case you have multiple installed), clean cmake binary dir between changes and so on.

alexisrozhkov
  • 1,623
  • 12
  • 18
0

After some further investigation it turned out that the Windows 10 Sdk did not install properly. Even with the Windows Software Development Kit checked during installation, which adds the headers, there were no include folders with headers actually installed.

Nikolay Arhangelov
  • 1,292
  • 3
  • 13
  • 21