Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Error during opencv 3.3.0 source compilation

Hi,

So I got the sources from : https://github.com/opencv/opencv/archive/3.3.0.zip

installed MinGW in c:\MinGW and rebooted (latest version)

I then installed Cmake from https://cmake.org/ (latest version)

I extracted the sources in c:\opencv_opencv3.3.0-sources

I runned cmakeGui

I gave it c:\opencv<_opencv3.3.0-sources as source dir and c:\opencv<_opencv3.3.0-build as build dir

I hitted 'configure', selected 'MinGW makefile' and let it run util it showed me checkboxes in red

I checked the C examples

I hitted 'configure' again and let it run, now all the line turned white

I hitted 'generate'

Then I went in c:\opencv_opencv3.3.0-build and opened a command line an typed : 'mingw32-make --debug'

and a 28% I get an error :

[ 28%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/mathfuncs_core.avx2.cpp.obj
    Successfully remade target file 'modules/core/CMakeFiles/opencv_core.dir/mathfuncs_core.avx2.cpp.obj'.
     File 'modules/core/CMakeFiles/opencv_core.dir/stat.avx2.cpp.obj' does not exist.
    Must remake target 'modules/core/CMakeFiles/opencv_core.dir/stat.avx2.cpp.obj'.
[ 28%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/stat.avx2.cpp.obj
    Successfully remade target file 'modules/core/CMakeFiles/opencv_core.dir/stat.avx2.cpp.obj'.
     File 'modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj' does not exist.
    Must remake target 'modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj'.
[ 28%] Building RC object modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj
C:\MinGW\bin\windres.exe: invalid option -- W
Usage: C:\MinGW\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.
C:\MinGW\bin\windres.exe: supported targets: pe-i386 pei-i386 elf32-i386 elf32-iamcu elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex
modules\core\CMakeFiles\opencv_core.dir\build.make:1641: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj' failed
mingw32-make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj] Error 1
CMakeFiles\Makefile2:1550: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed
mingw32-make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
Makefile:161: recipe for target 'all' failed
mingw32-make: *** [all] Error 2

I usually code in python with the pre-compiled cv2, but I wanted to try c++, I have no idea of what I can do. Any ideas? Thanks

ps : this is done on a windows 8.1 os