I also encountered the same problem when trying to create OpenCV 3.2.0 using mingw32 on Windows10 . I searched a bit to find a fix on Github for a similar problem. He said the problem was:
MinGW _CRITICAL_SECTION _RTL_CRITICAL_SECTION () , typedef
, typedef GTEST_CRITICAL_SECTION _CRITICAL_SECTION _RTL_CRITICAL_SECTION typedef .
:
"ts_gtest.h" , "opencv\sources\modules\ts\include\opencv2\ts \"
struct _RTL_CRITICAL_SECTION;
#if GTEST_OS_WINDOWS_MINGW
typedef struct _CRITICAL_SECTION GTEST_CRITICAL_SECTION;
#else
typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION;
#endif
- (, 3060, )
_RTL_CRITICAL_SECTION* critical_section_;
GTEST_CRITICAL_SECTION* critical_section_;
.