Strugging with MinGW while trying to link OpenCV libraries to Eclipse

asked 2018-08-23 00:32:50 -0500

spstrademark gravatar image

updated 2018-08-23 02:34:33 -0500

berak gravatar image

Hello all, It has been almost a week since i've been strugging trying to create a project and add a OpenCV library to it.

I have downloaded and extracted opencv-3.4.2-vc14_vc15.exe in a folder opencv My build folder is opencv_34_build

Downloaded and installed CMAKE - version 3.12.1 During the installation i have chosen to Add environment PATH for all users. ( Although it is one user on the PC - Me ) Downloaded and installed mingw-w64-install.exe - During the installation i have selected version 8.1.0 Architecture x86_x64 I have added in the environment path " C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin " also placed it on first position.

In CMake i've tried with Current generator " MinGW Makefiles " and " Eclipse CDT4 - MinGW MakeFile " When done my screen i get the following message - " Configuring done Generating done "

After that i open cmd go to the " opencv_34_build " directory typing " mingw32-make " and it starts making I have tried with and without " ENABLE_PRECOMPILED_HEADERS " difference is that when it is enabled i get the error before it reaches 40%.

After building for about 20 minutes i get the following error -

"

gcc: error: development\: No such file or directory
gcc: error: tools\opencv\sources\modules\core\include: No such file or directory
gcc: error: development\: No such file or directory
gcc: error: tools\opencv_34_build\modules\core: No such file or directory
gcc: error: development\: No such file or directory
gcc: error: tools\opencv\sources\3rdparty\zlib: No such file or directory
gcc: error: development\: No such file or directory
gcc: error: tools\opencv_34_build\3rdparty\zlib: No such file or directory
gcc: error: development\: No such file or directory
gcc: error: tools\opencv\sources\3rdparty\include\opencl\1.2: No such file or directory
gcc: error: development\: No such file or directory
gcc: error: tools\opencv_34_build: No such file or directory
C:\PROGRA~1\MINGW-~1\X86_64~1.0-P\mingw64\bin\windres.exe: preprocessing failed.
mingw32-make[2]: *** [modules\core\CMakeFiles\opencv_core.dir\build.make:1293: modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:1681: modules/core/CMakeFiles/opencv_core.dir/all] Error 2
mingw32-make: *** [Makefile:162: all] Error 2

"

Can someone help me please ?

Thank you for your time!

edit retag flag offensive close merge delete

Comments

please replace the useless screenshots with a TEXT version, so we can quote you correctly, thank you.

berak gravatar imageberak ( 2018-08-23 00:54:31 -0500 )edit

and ENABLE_PRECOMPILED_HEADERS must be OFF.

you also have to empty / clean your build folder from previous attempts !

berak gravatar imageberak ( 2018-08-23 01:00:14 -0500 )edit
1

Did that, at every new attempt i deleted the content of the build folder. Also edited the post with text. Thank you for your time!

spstrademark gravatar imagespstrademark ( 2018-08-23 02:18:15 -0500 )edit