Opencv 3.4.8 + Opencv contrib 3.4.8 + mingw32-make + ERROR while compiling(libopencv_hdf348.dll))

asked 2019-12-17 10:21:25 -0600

UU_KK gravatar image

I'm working on compiling opencv with contrib on Win10. I followed the steps in README.md on github. Things went well before the command "make -j5" And the main error info is here:

[ 32%] Linking CXX shared library ....\bin\libopencv_hdf348.dll
C:/Users/abc/Anaconda3/Library/lib/libhdf5.lib: error adding symbols: File format not recognized
collect2.exe: error: ld returned 1 exit status
modules\hdf\CMakeFiles\opencv_hdf.dir\build.make:110: recipe for target 'bin/libopencv_hdf348.dll' failed
mingw32-make[2]: *** [bin/libopencv_hdf348.dll] Error 1
CMakeFiles\Makefile2:3843: recipe for target 'modules/hdf/CMakeFiles/opencv_hdf.dir/all' failed
mingw32-make[1]: *** [modules/hdf/CMakeFiles/opencv_hdf.dir/all] Error 2
mingw32-make[1]: *** Waiting for unfinished jobs....

I did a lot of search but it seems no one have had such problem.
Thank you very much if you could help me.

edit retag flag offensive close merge delete

Comments

mingw32-make is a build utility, but which compiler do you try to use ?

libhdf5.lib: error adding symbols: File format not recognized

this one is for visual studio only.

try to disable the hdf (contrib) module in cmake, it's not mandatory

berak gravatar imageberak ( 2019-12-17 12:51:40 -0600 )edit

I use mingw64 gcc/g++ as compilers

UU_KK gravatar imageUU_KK ( 2019-12-17 23:36:14 -0600 )edit

again, try: cmake -DBUILD_opencv_hdf=OFF

berak gravatar imageberak ( 2019-12-18 01:58:15 -0600 )edit