mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
videoio: Include missing locale header for std::wstring_convert
This fixes the following error with mingw toolchain:
opencv/modules/videoio/src/cap_msmf.cpp:1020: error: 'wstring_convert' is not a member of 'std'
1020 | std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> conv;
| ^~~~~~~~~~~~~~~
opencv/modules/videoio/src/cap_ffmpeg_hw.hpp:230:26: error: 'wstring_convert' is not a member of 'std'
230 | std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> conv;
| ^~~~~~~~~~~~~~~
The locale header is required according to C++ standard.
See https://en.cppreference.com/w/cpp/locale/wstring_convert
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#define D3D11_NO_HELPERS
|
||||
#include <d3d11.h>
|
||||
#include <codecvt>
|
||||
#include <locale>
|
||||
#include "opencv2/core/directx.hpp"
|
||||
#ifdef HAVE_OPENCL
|
||||
#include <CL/cl_d3d11.h>
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#ifdef HAVE_MSMF_DXVA
|
||||
#include <d3d11.h>
|
||||
#include <d3d11_4.h>
|
||||
#include <locale>
|
||||
#endif
|
||||
#include <new>
|
||||
#include <map>
|
||||
|
||||
Reference in New Issue
Block a user