想利用QT的来做为OPENCV的界面, 但编译过程中遇到一些问题,编译过程不难,只是偶尔会碰到一些奇怪的问题,一些常见的问题在百度上很容易搜索到解决方法。
在自己笔记本上编译未发现任何问题,但在公司电脑上,cmake过程中没有报错,编译却出现了videoIO模块怎么都编译不过去的现象,千辛万苦才找到解决方法:
在opencv的源码文件cap_dshow.cpp中添加
#define STRSAFE_NO_DEPRECATE
原文链接:http://answers.opencv.org/question/62580/not-able-to-build-opencv3-rc1-with-debug-build-type/
我编译的是最新的opencv3.3,在50%的时候报错,上面的链接是 OpenCV3-RC1 版本,错误发生在43%。
错误信息如下:
[ 50%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dshow.cpp.obj
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp: In member function 'void videoInput::getMediaSubtypeAsString(GUID, char*)':
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2145:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
if( type == MEDIASUBTYPE_RGB24) sprintf(tmpStr, "RGB24");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2145:57: warning: left operand of comma operator has no effect [-Wunused-value]
if( type == MEDIASUBTYPE_RGB24) sprintf(tmpStr, "RGB24");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2146:5: error: 'else' without a previous 'if'
else if(type == MEDIASUBTYPE_RGB32) sprintf(tmpStr, "RGB32");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2146:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if(type == MEDIASUBTYPE_RGB32) sprintf(tmpStr, "RGB32");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2146:57: warning: left operand of comma operator has no effect [-Wunused-value]
else if(type == MEDIASUBTYPE_RGB32) sprintf(tmpStr, "RGB32");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2147:5: error: 'else' without a previous 'if'
else if(type == MEDIASUBTYPE_RGB555)sprintf(tmpStr, "RGB555");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2147:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if(type == MEDIASUBTYPE_RGB555)sprintf(tmpStr, "RGB555");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2147:57: warning: left operand of comma operator has no effect [-Wunused-value]
else if(type == MEDIASUBTYPE_RGB555)sprintf(tmpStr, "RGB555");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2148:5: error: 'else' without a previous 'if'
else if(type == MEDIASUBTYPE_RGB565)sprintf(tmpStr, "RGB565");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2148:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if(type == MEDIASUBTYPE_RGB565)sprintf(tmpStr, "RGB565");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2148:57: warning: left operand of comma operator has no effect [-Wunused-value]
else if(type == MEDIASUBTYPE_RGB565)sprintf(tmpStr, "RGB565");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2149:5: error: 'else' without a previous 'if'
else if(type == MEDIASUBTYPE_YUY2) sprintf(tmpStr, "YUY2");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2149:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if(type == MEDIASUBTYPE_YUY2) sprintf(tmpStr, "YUY2");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2149:57: warning: left operand of comma operator has no effect [-Wunused-value]
else if(type == MEDIASUBTYPE_YUY2) sprintf(tmpStr, "YUY2");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2150:5: error: 'else' without a previous 'if'
else if(type == MEDIASUBTYPE_YVYU) sprintf(tmpStr, "YVYU");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2150:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if(type == MEDIASUBTYPE_YVYU) sprintf(tmpStr, "YVYU");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2150:57: warning: left operand of comma operator has no effect [-Wunused-value]
else if(type == MEDIASUBTYPE_YVYU) sprintf(tmpStr, "YVYU");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2151:5: error: 'else' without a previous 'if'
else if(type == MEDIASUBTYPE_YUYV) sprintf(tmpStr, "YUYV");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2151:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if(type == MEDIASUBTYPE_YUYV) sprintf(tmpStr, "YUYV");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2151:57: warning: left operand of comma operator has no effect [-Wunused-value]
else if(type == MEDIASUBTYPE_YUYV) sprintf(tmpStr, "YUYV");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2152:5: error: 'else' without a previous 'if'
else if(type == MEDIASUBTYPE_IYUV) sprintf(tmpStr, "IYUV");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2152:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if(type == MEDIASUBTYPE_IYUV) sprintf(tmpStr, "IYUV");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2152:57: warning: left operand of comma operator has no effect [-Wunused-value]
else if(type == MEDIASUBTYPE_IYUV) sprintf(tmpStr, "IYUV");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2153:5: error: 'else' without a previous 'if'
else if(type == MEDIASUBTYPE_UYVY) sprintf(tmpStr, "UYVY");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2153:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if(type == MEDIASUBTYPE_UYVY) sprintf(tmpStr, "UYVY");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2153:57: warning: left operand of comma operator has no effect [-Wunused-value]
else if(type == MEDIASUBTYPE_UYVY) sprintf(tmpStr, "UYVY");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2154:5: error: 'else' without a previous 'if'
else if(type == MEDIASUBTYPE_YV12) sprintf(tmpStr, "YV12");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2154:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if(type == MEDIASUBTYPE_YV12) sprintf(tmpStr, "YV12");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2154:57: warning: left operand of comma operator has no effect [-Wunused-value]
else if(type == MEDIASUBTYPE_YV12) sprintf(tmpStr, "YV12");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2155:5: error: 'else' without a previous 'if'
else if(type == MEDIASUBTYPE_YVU9) sprintf(tmpStr, "YVU9");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2155:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if(type == MEDIASUBTYPE_YVU9) sprintf(tmpStr, "YVU9");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2155:57: warning: left operand of comma operator has no effect [-Wunused-value]
else if(type == MEDIASUBTYPE_YVU9) sprintf(tmpStr, "YVU9");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2156:5: error: 'else' without a previous 'if'
else if(type == MEDIASUBTYPE_Y411) sprintf(tmpStr, "Y411");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2156:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if(type == MEDIASUBTYPE_Y411) sprintf(tmpStr, "Y411");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2156:57: warning: left operand of comma operator has no effect [-Wunused-value]
else if(type == MEDIASUBTYPE_Y411) sprintf(tmpStr, "Y411");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2157:5: error: 'else' without a previous 'if'
else if(type == MEDIASUBTYPE_Y41P) sprintf(tmpStr, "Y41P");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2157:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if(type == MEDIASUBTYPE_Y41P) sprintf(tmpStr, "Y41P");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2157:57: warning: left operand of comma operator has no effect [-Wunused-value]
else if(type == MEDIASUBTYPE_Y41P) sprintf(tmpStr, "Y41P");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2158:5: error: 'else' without a previous 'if'
else if(type == MEDIASUBTYPE_Y211) sprintf(tmpStr, "Y211");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2158:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if(type == MEDIASUBTYPE_Y211) sprintf(tmpStr, "Y211");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2158:57: warning: left operand of comma operator has no effect [-Wunused-value]
else if(type == MEDIASUBTYPE_Y211) sprintf(tmpStr, "Y211");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2159:5: error: 'else' without a previous 'if'
else if(type == MEDIASUBTYPE_AYUV) sprintf(tmpStr, "AYUV");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2159:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if(type == MEDIASUBTYPE_AYUV) sprintf(tmpStr, "AYUV");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2159:57: warning: left operand of comma operator has no effect [-Wunused-value]
else if(type == MEDIASUBTYPE_AYUV) sprintf(tmpStr, "AYUV");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2160:5: error: 'else' without a previous 'if'
else if(type == MEDIASUBTYPE_MJPG) sprintf(tmpStr, "MJPG");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2160:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if(type == MEDIASUBTYPE_MJPG) sprintf(tmpStr, "MJPG");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2160:57: warning: left operand of comma operator has no effect [-Wunused-value]
else if(type == MEDIASUBTYPE_MJPG) sprintf(tmpStr, "MJPG");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2161:5: error: 'else' without a previous 'if'
else if(type == MEDIASUBTYPE_Y800) sprintf(tmpStr, "Y800");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2161:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if(type == MEDIASUBTYPE_Y800) sprintf(tmpStr, "Y800");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2161:57: warning: left operand of comma operator has no effect [-Wunused-value]
else if(type == MEDIASUBTYPE_Y800) sprintf(tmpStr, "Y800");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2162:5: error: 'else' without a previous 'if'
else if(type == MEDIASUBTYPE_Y8) sprintf(tmpStr, "Y8");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2162:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if(type == MEDIASUBTYPE_Y8) sprintf(tmpStr, "Y8");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2162:57: warning: left operand of comma operator has no effect [-Wunused-value]
else if(type == MEDIASUBTYPE_Y8) sprintf(tmpStr, "Y8");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2163:5: error: 'else' without a previous 'if'
else if(type == MEDIASUBTYPE_GREY) sprintf(tmpStr, "GREY");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2163:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if(type == MEDIASUBTYPE_GREY) sprintf(tmpStr, "GREY");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2163:57: warning: left operand of comma operator has no effect [-Wunused-value]
else if(type == MEDIASUBTYPE_GREY) sprintf(tmpStr, "GREY");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2164:5: error: 'else' without a previous 'if'
else if(type == MEDIASUBTYPE_I420) sprintf(tmpStr, "I420");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2164:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if(type == MEDIASUBTYPE_I420) sprintf(tmpStr, "I420");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2164:57: warning: left operand of comma operator has no effect [-Wunused-value]
else if(type == MEDIASUBTYPE_I420) sprintf(tmpStr, "I420");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2165:5: error: 'else' without a previous 'if'
else sprintf(tmpStr, "OTHER");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2165:10: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else sprintf(tmpStr, "OTHER");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2165:26: warning: left operand of comma operator has no effect [-Wunused-value]
else sprintf(tmpStr, "OTHER");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp: In member function 'void videoInput::getVideoPropertyAsString(int, char*)':
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2191:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
if ( prop==VideoProcAmp_Brightness) sprintf(tmpStr, "Brightness");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2191:57: warning: left operand of comma operator has no effect [-Wunused-value]
if ( prop==VideoProcAmp_Brightness) sprintf(tmpStr, "Brightness");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2192:5: error: 'else' without a previous 'if'
else if ( prop==VideoProcAmp_Contrast) sprintf(tmpStr, "Contrast");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2192:44: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if ( prop==VideoProcAmp_Contrast) sprintf(tmpStr, "Contrast");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2192:60: warning: left operand of comma operator has no effect [-Wunused-value]
else if ( prop==VideoProcAmp_Contrast) sprintf(tmpStr, "Contrast");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2193:5: error: 'else' without a previous 'if'
else if ( prop==VideoProcAmp_Saturation) sprintf(tmpStr, "Saturation");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2193:46: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if ( prop==VideoProcAmp_Saturation) sprintf(tmpStr, "Saturation");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2193:62: warning: left operand of comma operator has no effect [-Wunused-value]
else if ( prop==VideoProcAmp_Saturation) sprintf(tmpStr, "Saturation");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2194:5: error: 'else' without a previous 'if'
else if ( prop==VideoProcAmp_Hue) sprintf(tmpStr, "Hue");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2194:39: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if ( prop==VideoProcAmp_Hue) sprintf(tmpStr, "Hue");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2194:55: warning: left operand of comma operator has no effect [-Wunused-value]
else if ( prop==VideoProcAmp_Hue) sprintf(tmpStr, "Hue");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2195:5: error: 'else' without a previous 'if'
else if ( prop==VideoProcAmp_Gain) sprintf(tmpStr, "Gain");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2195:40: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if ( prop==VideoProcAmp_Gain) sprintf(tmpStr, "Gain");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2195:56: warning: left operand of comma operator has no effect [-Wunused-value]
else if ( prop==VideoProcAmp_Gain) sprintf(tmpStr, "Gain");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2196:5: error: 'else' without a previous 'if'
else if ( prop==VideoProcAmp_Gamma) sprintf(tmpStr, "Gamma");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2196:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if ( prop==VideoProcAmp_Gamma) sprintf(tmpStr, "Gamma");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2196:57: warning: left operand of comma operator has no effect [-Wunused-value]
else if ( prop==VideoProcAmp_Gamma) sprintf(tmpStr, "Gamma");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2197:5: error: 'else' without a previous 'if'
else if ( prop==VideoProcAmp_ColorEnable) sprintf(tmpStr, "ColorEnable");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2197:47: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if ( prop==VideoProcAmp_ColorEnable) sprintf(tmpStr, "ColorEnable");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2197:63: warning: left operand of comma operator has no effect [-Wunused-value]
else if ( prop==VideoProcAmp_ColorEnable) sprintf(tmpStr, "ColorEnable");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2198:5: error: 'else' without a previous 'if'
else if ( prop==VideoProcAmp_Sharpness) sprintf(tmpStr, "Sharpness");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2198:45: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if ( prop==VideoProcAmp_Sharpness) sprintf(tmpStr, "Sharpness");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2198:61: warning: left operand of comma operator has no effect [-Wunused-value]
else if ( prop==VideoProcAmp_Sharpness) sprintf(tmpStr, "Sharpness");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2199:5: error: 'else' without a previous 'if'
else sprintf(tmpStr, "%u",prop);
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2199:10: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else sprintf(tmpStr, "%u",prop);
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2199:26: warning: left operand of comma operator has no effect [-Wunused-value]
else sprintf(tmpStr, "%u",prop);
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2199:31: warning: right operand of comma operator has no effect [-Wunused-value]
else sprintf(tmpStr, "%u",prop);
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp: In member function 'void videoInput::getCameraPropertyAsString(int, char*)':
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2295:35: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
if ( prop==CameraControl_Pan) sprintf(tmpStr, "Pan");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2295:51: warning: left operand of comma operator has no effect [-Wunused-value]
if ( prop==CameraControl_Pan) sprintf(tmpStr, "Pan");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2296:5: error: 'else' without a previous 'if'
else if ( prop==CameraControl_Tilt) sprintf(tmpStr, "Tilt");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2296:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if ( prop==CameraControl_Tilt) sprintf(tmpStr, "Tilt");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2296:57: warning: left operand of comma operator has no effect [-Wunused-value]
else if ( prop==CameraControl_Tilt) sprintf(tmpStr, "Tilt");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2297:5: error: 'else' without a previous 'if'
else if ( prop==CameraControl_Roll) sprintf(tmpStr, "Roll");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2297:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if ( prop==CameraControl_Roll) sprintf(tmpStr, "Roll");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2297:57: warning: left operand of comma operator has no effect [-Wunused-value]
else if ( prop==CameraControl_Roll) sprintf(tmpStr, "Roll");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2298:5: error: 'else' without a previous 'if'
else if ( prop==CameraControl_Zoom) sprintf(tmpStr, "Zoom");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2298:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if ( prop==CameraControl_Zoom) sprintf(tmpStr, "Zoom");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2298:57: warning: left operand of comma operator has no effect [-Wunused-value]
else if ( prop==CameraControl_Zoom) sprintf(tmpStr, "Zoom");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2299:5: error: 'else' without a previous 'if'
else if ( prop==CameraControl_Exposure) sprintf(tmpStr, "Exposure");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2299:45: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if ( prop==CameraControl_Exposure) sprintf(tmpStr, "Exposure");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2299:61: warning: left operand of comma operator has no effect [-Wunused-value]
else if ( prop==CameraControl_Exposure) sprintf(tmpStr, "Exposure");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2300:5: error: 'else' without a previous 'if'
else if ( prop==CameraControl_Iris) sprintf(tmpStr, "Iris");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2300:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if ( prop==CameraControl_Iris) sprintf(tmpStr, "Iris");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2300:57: warning: left operand of comma operator has no effect [-Wunused-value]
else if ( prop==CameraControl_Iris) sprintf(tmpStr, "Iris");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2301:5: error: 'else' without a previous 'if'
else if ( prop==CameraControl_Focus) sprintf(tmpStr, "Focus");
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2301:42: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if ( prop==CameraControl_Focus) sprintf(tmpStr, "Focus");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2301:58: warning: left operand of comma operator has no effect [-Wunused-value]
else if ( prop==CameraControl_Focus) sprintf(tmpStr, "Focus");
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2302:5: error: 'else' without a previous 'if'
else sprintf(tmpStr, "%u",prop);
^
In file included from D:/Qt5.7.0/Tools/mingw530_32/i686-w64-mingw32/include/DShow.h:33:0,
from E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:111:
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2302:10: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else sprintf(tmpStr, "%u",prop);
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2302:26: warning: left operand of comma operator has no effect [-Wunused-value]
else sprintf(tmpStr, "%u",prop);
^
E:\software\opencv\opencv-master33\modules\videoio\src\cap_dshow.cpp:2302:31: warning: right operand of comma operator has no effect [-Wunused-value]
else sprintf(tmpStr, "%u",prop);
^
modules\videoio\CMakeFiles\opencv_videoio.dir\build.make:187: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dshow.cpp.obj' failed
mingw32-make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dshow.cpp.obj] Error 1
CMakeFiles\Makefile2:2867: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/all' failed
mingw32-make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
Makefile:161: recipe for target 'all' failed
mingw32-make: *** [all] Error 2