2017-08-16 00:23:35 -0600 | received badge | ● Editor (source) |
2017-08-16 00:23:07 -0600 | answered a question | Building OpenCV with MinGW (gcc 7.1.0 and cmake 3.9.0)-> windres.exe: unknown option -- W I also had this issue when I compiled OpenCV3.3 source code for Qt. Then I found the hint here(https://wiki.qt.io/How_to_setup_Qt_and_openCV_on_Windows). ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ If you have the following error : ... windres.exe: unknown option -- W ... try this : in cmake uncheck ENABLE_PRECOMPILED_HEADERS If, in the file opencv/sources/modules/videoio/src/cap_dshow.cpp, you have the following error : 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope ... try this :put the following line: #define NO_DSHOW_STRSAFE, before the line : #include "DShow.h" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Following above hints, it's OK at last. My envirement: Whindows 7/10 64bit, Cmake 3.9.1, Qt5.9.1 |