Ask Your Question

Revision history [back]

OpenCV UWP build fails.

Hello,

I cloned the official github repo of OpenCV and used CMake to build the VS Solution.

 cmake -G "Visual Studio 14 2015" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0" .

As you can see, I want to build OpenCV for UWP 32-Bit. When building in VS 2015 the opencv_core module fails with:

Error   C2664   'BOOL CreateDirectoryA(LPCSTR,LPSECURITY_ATTRIBUTES)': cannot convert argument 1 from 'wchar_t [260]' to 'LPCSTR'
Error   C2039   'CreateFileA': is not a member of '`global namespace''  
Error   C3861   'CreateFileA': identifier not found
Error   C2664   'DWORD GetTempPathW(DWORD,LPWSTR)': cannot convert argument 2 from 'char [261]' to 'LPWSTR'

All these error are in the opencv_core in the file "filesystem.cpp. Now, I already successfully build it a few weeks ago, before I had to reformat my pc. Now it just won't build and I don't know exactly how to fix these errors. I would prefer to not modify the opencv source code.