Ask Your Question
0

Opencv 3.4.0 + Opencv contrib + MinGW 4.9.2 + ERROR while compiling (mingw-make)

asked 2018-01-18 13:51:32 -0600

Leo55 gravatar image

updated 2018-01-19 06:27:27 -0600

berak gravatar image

System:

Windows 7 64bit

Mingw:

version : MinGW-W64-builds-4.2.0
date    : 09.01.2015-12:22:14 PM
args    : --mode=gcc-4.9.2 --buildroot=/c/mingw492

opencv:

v 3.4.0 with opencv-contrib 3.4.0

compiling with mingw24-make gives me following error:

C:\opencv (v 3.4.0)\opencv\sources\modules\videoio\src\cap_vfw.cpp:648:37: warni
ng: missing initializer for member 'tagCapStatus::hPalCurrent' [-Wmissing-field-
initializers]
C:\opencv (v 3.4.0)\opencv\sources\modules\videoio\src\cap_vfw.cpp:648:37: warni
ng: missing initializer for member 'tagCapStatus::fCapturingNow' [-Wmissing-fiel
d-initializers]
C:\opencv (v 3.4.0)\opencv\sources\modules\videoio\src\cap_vfw.cpp:648:37: warni
ng: missing initializer for member 'tagCapStatus::dwReturn' [-Wmissing-field-ini
tializers]
C:\opencv (v 3.4.0)\opencv\sources\modules\videoio\src\cap_vfw.cpp:648:37: warni
ng: missing initializer for member 'tagCapStatus::wNumVideoAllocated' [-Wmissing
-field-initializers]
C:\opencv (v 3.4.0)\opencv\sources\modules\videoio\src\cap_vfw.cpp:648:37: warni
ng: missing initializer for member 'tagCapStatus::wNumAudioAllocated' [-Wmissing
-field-initializers]
[ 35%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap
_ffmpeg.cpp.obj
C:\opencv (v 3.4.0)\opencv\sources\modules\videoio\src\cap_ffmpeg.cpp:65:42: war
ning: type qualifiers ignored on function return type [-Wignored-qualifiers]
 static const HMODULE cv_GetCurrentModule()
                                          ^
[ 35%] Building RC object modules/videoio/CMakeFiles/opencv_videoio.dir/vs_versi
on.rc.obj
gcc: error: \(v\: No such file or directory
gcc: error: 3.4.0\)\opencv\sources\3rdparty\include\ffmpeg_: No such file or dir
ectory
C:\MinGW\bin\windres.exe: preprocessing failed.
modules\videoio\CMakeFiles\opencv_videoio.dir\build.make:261: recipe for target
'modules/videoio/CMakeFiles/opencv_videoio.dir/vs_version.rc.obj' failed
mingw32-make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/vs_version.r
c.obj] Error 1
CMakeFiles\Makefile2:4508: recipe for target 'modules/videoio/CMakeFiles/opencv_
videoio.dir/all' failed
mingw32-make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2

makefile:161: recipe for target 'all' failed
mingw32-make: *** [all] Error 2

C:\opencv (v 3.4.0)\opencv\build\x64\mingw>

cmake-output

Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.7")
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.6")
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "3.4")
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "3.2")
CUDA compilation is disabled (due to only Visual Studio compiler supported on your platform).
Could not find OpenBLAS include. Turning OpenBLAS_FOUND off
Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
A library with BLAS API not found. Please specify library location.
LAPACK requires BLAS
A library with LAPACK API not found. Please specify library location.
Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) 
Could NOT find Pylint (missing: PYLINT_EXECUTABLE) 
Could NOT find Matlab (missing: MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN) 
VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
Caffe:   NO
Protobuf:   NO ...
(more)
edit retag flag offensive close merge delete

Comments

delete cmakecache.txt and try to compile with option ENABLE_PRECOMPILED_HEADERS:BOOL=OFF in cmake option

LBerger gravatar imageLBerger ( 2018-01-18 14:18:53 -0600 )edit
1

I did already: 1. ENABLE_PRECOMPILED_HEADERS:BOOL=OFF in cmake option for eliminating windres.exe-error with deleting cmake-cache and starting always with empty opencv-mingw-directory. 2. I put the following line: #define NO_DSHOW_STRSAFE, before the line : #include "DShow.h" for eliminating "opencv/sources/modules/videoio/src/cap_dshow.cpp-error. My error looks like "http://answers.opencv.org/question/17..." but that answer and comments there did not helped.

Leo55 gravatar imageLeo55 ( 2018-01-18 14:36:41 -0600 )edit

can you add the cmake output to your question ?

berak gravatar imageberak ( 2018-01-19 05:34:37 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-01-19 13:16:04 -0600

mshabunin gravatar image

Rename your folder: C:\opencv (v 3.4.0)\ will not work, try not to use spaces, dots and parenthesis For example: C:\opencv_340\

edit flag offensive delete link more

Comments

That was the solution ! Thank you very much !!

Leo55 gravatar imageLeo55 ( 2018-01-19 20:23:07 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2018-01-18 13:51:32 -0600

Seen: 4,037 times

Last updated: Jan 19 '18