Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Building OpenCV with MinGW (gcc 7.1.0 and cmake 3.9.0)-> windres.exe: unknown option -- W

Hi!

Windows 10 x64

I try to build (default options) the current opencv master (2017/07/23) in MinGW (Mingw-builds, msys2) and i get;

> make
[  2%] Built target zlib
[  5%] Built target libtiff
[  8%] Built target libjpeg
[ 16%] Built target libwebp
[ 19%] Built target libjasper
[ 20%] Built target libpng
[ 25%] Built target IlmImf
[ 31%] Built target libprotobuf
[ 32%] Built target opencv_core_pch_dephelp
[ 32%] Built target pch_Generate_opencv_core
[ 32%] Building RC object modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj
v:\MinGW-Builds\mingw64\bin\windres.exe: unknown option -- W
Usage: v:\MinGW-Builds\mingw64\bin\windres.exe [option(s)] [input-file] [output-file]
 The options are:
  -i --input=<file>            Name input file
  -o --output=<file>           Name output file
  -J --input-format=<format>   Specify input format
  -O --output-format=<format>  Specify output format
  -F --target=<target>         Specify COFF target
     --preprocessor=<program>  Program to use to preprocess rc file
     --preprocessor-arg=<arg>  Additional preprocessor argument
  -I --include-dir=<dir>       Include directory when preprocessing rc file
  -D --define <sym>[=<val>]    Define SYM when preprocessing rc file
  -U --undefine <sym>          Undefine SYM when preprocessing rc file
  -v --verbose                 Verbose - tells you what it's doing
  -c --codepage=<codepage>     Specify default codepage
  -l --language=<val>          Set language when reading rc file
     --use-temp-file           Use a temporary file instead of popen to read
                               the preprocessor output
     --no-use-temp-file        Use popen (default)
  -r                           Ignored for compatibility with rc
  @<file>                      Read options from <file>
  -h --help                    Print this help message
  -V --version                 Print version information
FORMAT is one of rc, res, or coff, and is deduced from the file name
extension if not specified.  A single file name is an input file.
No input-file is stdin, default rc.  No output-file is stdout, default rc.
v:\MinGW-Builds\mingw64\bin\windres.exe: supported targets: pe-x86-64 pei-x86-64 pe-bigobj-x86-64 elf64-x86-64 elf64-l1om elf64-k1om pe-i386 pei-i386 elf32-i386 elf32-iamcu elf64-little elf64-big elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex
modules/core/CMakeFiles/opencv_core.dir/build.make:1642: recipe for target `modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj' failed
make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj] Error 1
CMakeFiles/Makefile2:1512: recipe for target `modules/core/CMakeFiles/opencv_core.dir/all' failed
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
Makefile:162: recipe for target `all' failed
make: *** [all] Error 2

Any idea? Thanks in advance!

DJuego