【发布时间】:2018-05-08 22:54:33
【问题描述】:
我克隆了 OpenCV 的官方 github repo 并使用 CMake 生成了 VS 解决方案。
cmake -G "Visual Studio 14 2015" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0" .
如您所见,我想为 UWP 32 位构建 OpenCV。在 VS 2015 中构建时,opencv_core 模块失败:
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'
所有这些错误都在文件“filesystem.cpp”中的 opencv_core 中。现在,几周前我已经成功构建了它,在我不得不重新格式化我的电脑之前。现在它不会构建,我不会知道如何解决这些问题。这些问题会不会与 Windows 10 SDK 有关?
【问题讨论】:
标签: c++ visual-studio opencv cmake uwp