compile opencv error

asked 2019-06-03 22:51:48 -0500

lyy gravatar image

updated 2019-06-04 04:07:23 -0500

berak gravatar image

win10 64 bit cmake 3.7.2 mingw73 opencv4.0.1 compile error

cap_dshow.cpp:2298:41: error: 'strcpy_instead_use_StringCbCopyA_or_StringCchCopyA' was not declared in this scope
     if( type == MEDIASUBTYPE_RGB24)     strcpy(tmpStr, "RGB24");
                                         ^
H:\software\opencv\sources\modules\videoio\src\cap_dshow.cpp:2298:56: warning: left operand of comma operator has no effect [-Wunused-value]
     if( type == MEDIASUBTYPE_RGB24)     strcpy(tmpStr, "RGB24");
                                                        ^~~~~~~
H:\software\opencv\sources\modules\videoio\src\cap_dshow.cpp:2299:5: error: 'else' without a previous 'if'
     else if(type == MEDIASUBTYPE_RGB32) strcpy(tmpStr, "RGB32");
     ^~~~
In file included from H:/software/programming/qt/Tools/mingw730_32/i686-w64-mingw32/include/DShow.h:33:0,
                 from H:\software\opencv\sources\modules\videoio\src\cap_dshow.cpp:111:
H:\software\opencv\sources\modules\videoio\src\cap_dshow.cpp:2299:41: error: 'strcpy_instead_use_StringCbCopyA_or_StringCchCopyA' was not declared in this scope
     else if(type == MEDIASUBTYPE_RGB32) strcpy(tmpStr, "RGB32");
                                         ^
H:\software\opencv\sources\modules\videoio\src\cap_dshow.cpp:2299:56: warning: left operand of comma operator has no effect [-Wunused-value]
     else if(type == MEDIASUBTYPE_RGB32) strcpy(tmpStr, "RGB32");
                                                        ^~~~~~~
H:\software\opencv\sources\modules\videoio\src\cap_dshow.cpp:2300:5: error: 'else' without a previous 'if'
     else if(type == MEDIASUBTYPE_RGB555)strcpy(tmpStr, "RGB555");
edit retag flag offensive close merge delete