Not able to build OpenCV3-RC1 with 'Debug' build type
Hi,
I have problems to build OpenCV3-RC1 with the Debug build type activated. I was able to build a normal shared library version, but with debug mode I get the following:
error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
My compiler is 'mingw-w64 4.9.2 posix sjlj'.
Extract from the log:
[ 2%] [ 9%] Built target zlib
Built target libjpeg
[ 18%] [ 23%] Built target libwebp
Built target libjasper
[ 23%] Built target opencv_ts_pch_dephelp
[ 26%] [ 32%] Built target libpng
[ 42%] Built target libtiff
Built target IlmImf
[ 42%] Built target pch_Generate_opencv_ts
[ 42%] Building CXX object modules/world/CMakeFiles/opencv_world.dir/__/videoio/src/cap_dshow.cpp.obj
[ 42%] [ 43%] Building CXX object modules/world/CMakeFiles/opencv_world.dir/__/features2d/src/dynamic.cpp.obj
Building CXX object modules/world/CMakeFiles/opencv_world.dir/__/features2d/src/evaluation.cpp.obj
[ 43%] Building CXX object modules/world/CMakeFiles/opencv_world.dir/__/features2d/src/fast.cpp.obj
[ 43%] Building CXX object modules/world/CMakeFiles/opencv_world.dir/__/features2d/src/fast_score.cpp.obj
In file included from D:\Programmierung\Bibliotheken\OpenCV\3.0.0-rc1\opencv\sources\modules\videoio\src\cap_dshow.cpp:332:0:
D:\Programmierung\Bibliotheken\OpenCV\3.0.0-rc1\opencv\sources\modules\videoio\src\cap_dshow.cpp: In member function 'void videoInput::getMediaSubtypeAsString(GUID, char*)':
D:\Programmierung\Bibliotheken\OpenCV\3.0.0-rc1\opencv\sources\modules\videoio\src\cap_dshow.cpp:2178:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
if( type == MEDIASUBTYPE_RGB24) sprintf(tmpStr, "RGB24");
^
D:\Programmierung\Bibliotheken\OpenCV\3.0.0-rc1\opencv\sources\modules\videoio\src\cap_dshow.cpp:2178:57: warning: left operand of comma operator has no effect [-Wunused-value]
if( type == MEDIASUBTYPE_RGB24) sprintf(tmpStr, "RGB24");
^
D:\Programmierung\Bibliotheken\OpenCV\3.0.0-rc1\opencv\sources\modules\videoio\src\cap_dshow.cpp:2179:5: error: 'else' without a previous 'if'
else if(type == MEDIASUBTYPE_RGB32) sprintf(tmpStr, "RGB32");
^
In file included from D:\Programmierung\Bibliotheken\OpenCV\3.0.0-rc1\opencv\sources\modules\videoio\src\cap_dshow.cpp:332:0:
D:\Programmierung\Bibliotheken\OpenCV\3.0.0-rc1\opencv\sources\modules\videoio\src\cap_dshow.cpp:2179:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if(type == MEDIASUBTYPE_RGB32) sprintf(tmpStr, "RGB32");
^
D:\Programmierung\Bibliotheken\OpenCV\3.0.0-rc1\opencv\sources\modules\videoio\src\cap_dshow.cpp:2179:57: warning: left operand of comma operator has no effect [-Wunused-value]
else if(type == MEDIASUBTYPE_RGB32) sprintf(tmpStr, "RGB32");
^
D:\Programmierung\Bibliotheken\OpenCV\3.0.0-rc1\opencv\sources\modules\videoio\src\cap_dshow.cpp:2180:5: error: 'else' without a previous 'if'
else if(type == MEDIASUBTYPE_RGB555)sprintf(tmpStr, "RGB555");
^
In file included from D:\Programmierung\Bibliotheken\OpenCV\3.0.0-rc1\opencv\sources\modules\videoio\src\cap_dshow.cpp:332:0:
D:\Programmierung\Bibliotheken\OpenCV\3.0.0-rc1\opencv\sources\modules\videoio\src\cap_dshow.cpp:2180:41: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope
else if(type == MEDIASUBTYPE_RGB555)sprintf(tmpStr, "RGB555");
^
D:\Programmierung\Bibliotheken\OpenCV\3.0.0-rc1\opencv\sources\modules\videoio\src\cap_dshow.cpp:2180:57: warning: left operand of comma operator has no effect [-Wunused-value]
else if(type == MEDIASUBTYPE_RGB555)sprintf(tmpStr, "RGB555");
^
D:\Programmierung\Bibliotheken\OpenCV\3.0.0-rc1 ...
Yes i have the same problem with OpenCV-3.0.0
My compiler is 'x86_64-5.1.0-release-win32-seh-rt_v4-rev0'. (mingw-builds 64 bits gcc 5.1.0 win32 seh) [Windows 8.1]
DJuego