Qt6.8.1 Mingw13.1 编译opencv4.10时cannot convert ‘char*‘ to ‘LPWSTR
当选择build_world时出错
G:\ForOpencv4.10\opencv-4.10.0\modules\core\src\utils\filesystem.cpp: In function 'cv::String cv::utils::fs::getCacheDirectory(const char*, const char*)':
G:\ForOpencv4.10\opencv-4.10.0\modules\core\src\utils\filesystem.cpp:442:43: error: cannot convert 'char*' to 'LPWSTR' {aka 'wchar_t*'}
442 | DWORD res = GetTempPath(MAX_PATH, tmp_path_buf);
| ^~~~~~~~~~~~
| |
| char*
目前没有找到什么原因,不过不勾选 BUILD_opencv_world的话,后面编译就没有这个错误了