Linking CXX shared library ..\..\bin\libopencv_core341.dll CMAKE/QT ERROR ?
Hi, I am trying to setup the OpenCV image processing library v3.4.1 with QT v5.10.1 and cmake-gui v3.10.2 using the guide here: How_to_setup_Qt_and_openCV_on_Windows. I am using Windows 7 64bit.
I have followed all instructions exactly but when I run the command mingw32-make I get the following error:
[ 37%] Linking CXX shared library ..\..\bin\libopencv_core341.dll
CMakeFiles\opencv_core.dir/objects.a: member CMakeFiles\opencv_core.dir/objects.
a(vs_version.rc.obj) in archive is not an object
collect2.exe: error: ld returned 1 exit status
modules\core\CMakeFiles\opencv_core.dir\build.make:2329: recipe for target 'bin/
libopencv_core341.dll' failed
mingw32-make[2]: *** [bin/libopencv_core341.dll] Error 1
CMakeFiles\Makefile2:1675: recipe for target 'modules/core/CMakeFiles/opencv_cor
e.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 have already tried disabling "pre-compiled-headers" in CMAKE. I have searched endlessly for a solution but nothing has worked thus far.
OpenCV v2.4.13.6 compiles/builds without any issues.
Any help is appreciated, thanks !
try linking againstlibopencv_core341.dll.a
, the archive file, not the dll@berak How would I go about doing that with CMAKE-GUI ? I forgot to mention that OpenCV v2.4.13.6 compiles/builds without problems. Thanks
apologies, i misread the error. no idea, now. ;(
"disabling "pre-compiled-headers" in CMAKE" -- yes, correct.
"QT v5.10.1" -- what does
g++ --version
say ?@berak
g++ (x86_64-posix-seh, Built by strawberryperl.com project) 7.1.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
that looks quite fresh (and it works with 7.2 for me). out of ideas, sorry.
was that your 1st attempt at building the libs ? if NOT so, it might be a good idea, to delete the whole build folder, and start from scratch with cmake (maybe some previous artefacts got in your way)
@berak Nope, I have tried it from scratch many times before. Each time I've tried something different but it never works.