1
0
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:
Biswapriyo Nath
2022-08-19 13:14:57 +05:30
parent 7deb8f568f
commit 984e42b0bc
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -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>
+1
View File
@@ -29,6 +29,7 @@
#ifdef HAVE_MSMF_DXVA
#include <d3d11.h>
#include <d3d11_4.h>
#include <locale>
#endif
#include <new>
#include <map>