Installing opencv for C++ on Windows [closed]

asked 2018-05-21 17:01:41 -0600

updated 2020-11-17 04:13:15 -0600

Hello everybody,

I have a massive problem as I try to make OpenCV work, the following error occurs while I try to run mingw32-make on cmd:

=============================

[ 41%] Building RC object modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj

Der Befehl "D:\Program" ist entweder falsch geschrieben oder konnte nicht gefunden werden.

D:\Program Files\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin\windres.exe: preprocessing failed.

mingw32-make[2]: * [modules\core\CMakeFiles\opencv_core.dir\build.make:1279: modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj] Error 1

mingw32-make[2]: * Waiting for unfinished jobs....

mingw32-make[1]: * [CMakeFiles\Makefile2:1676: modules/core/CMakeFiles/opencv_core.dir/all] Error 2

mingw32-make: * [Makefile:162: all] Error 2

=============================

I am using CMake Version 3.11.2 and opencv Version 3.4.1. In my previous research, I disabled ENABLE_PRECOMPILED_HEADERS, BUILD_IPP_IW, BUILD_WITH_DYNAMIC_IPP, WITH_IPP, but unfortunately, nothing works. I followed the instruction of link text

It would be really great, if someone could help me =)

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by sturkmen
close date 2020-11-17 04:13:01.022484

Comments

cmake -DENABLE_PRECOMPILED_HEADERS=OFF -DWITH_IPP=OFF

(IPP is delivered as VS prebuilt libs, you cannot use it with mingw)

berak gravatar imageberak ( 2018-05-21 20:36:55 -0600 )edit

I turned ENABLE_PRECOMPILED_HEADERS and WITH_IPP off in the CMake GUI, but the error still appears. Could it be any other option in CMake, that I have to turn on or off?

Raiden591 gravatar imageRaiden591 ( 2018-05-22 02:26:25 -0600 )edit

the RC related error above is due to precompiled headers. maybe you have to clean your build folder.

berak gravatar imageberak ( 2018-05-22 02:31:54 -0600 )edit