OpenCV

21
Oct

CMake编译Opencv时遇到的bug解决方案 windres.exe: unknown option -- W ... ; 'sprintf_instead_use_StringCbPrintfA_ was not declared in this scope ..

执行mingw32-make后

28%左右遇到这种错误:
... windres.exe: unknown option -- W ...

解决方案:
在cmake中 取消勾选 ENABLE_PRECOMPILED_HEADERS


32%左右遇到这种错误 :
'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope ...

解决方案:
在..\opencv\sources\modules\videoio\src\cap_dshow.cpp
在#include "DShow.h"这一行前加上#define NO_DSHOW_STRSAFE