huihut / OpenCV-MinGW-Build

👀 MinGW 32bit and 64bit version of OpenCV compiled on Windows. Including OpenCV 3.3.1, 3.4.1, 3.4.1-x64, 3.4.5, 3.4.6, 3.4.7, 3.4.8-x64, 3.4.9, 4.0.0-alpha-x64, 4.0.0-rc-x64, 4.0.1-x64, 4.1.0, 4.1.0-x64, 4.1.1-x64, 4.5.0-with-contrib, 4.5.2-x64
https://opencv.org/
963 stars 219 forks source link

Missing Library MinGW build x64 #9

Closed ii64 closed 5 years ago

ii64 commented 5 years ago

Hello, It's nice to see you created build result of opencv 4.0.1 for MinGW, however i got error lib not exist like picture shown below, but it solved so i just put this issue here and close it (in case someone got same error like mine) image

D:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_face401
D:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_xfeatures2d401
D:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_plot401
D:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_tracking401
D:/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_img_hash401
collect2.exe: error: ld returned 1 exit status

so i tried to build them from source, then i found some libs is not exist in your build i hope you update the build result, thank you

huihut commented 5 years ago

@anysz Is your errors similar to issue#8?

Can you solve it according to my comments? How did you solve it?

ii64 commented 5 years ago

@anysz Is your errors similar to issue#8?

Yes

How did you solve it?

I build them from source, then i found some libs is not exist in your build, so i copied all my build and replace yours

cmake D:\LINE\_prj_shared\ImageSimmilar\opencv-4.0.1 -G "MinGW Makefiles" -BD:\LINE\_prj_shared\ImageSimmilar\build -DENABLE_CXX11=ON -DOPENCV_EXTRA_MODULES_PATH=D:\LINE\_prj_shared\ImageSimmilar\opencv_contrib-4.0.1\modules -DBUILD_SHARED_LIBS=ON -DWITH_IPP=OFF -DWITH_MSMF=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_opencv_java=OFF -DBUILD_opencv_python=OFF -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF -DBUILD_DOCS=OFF -DENABLE_PRECOMPILED_HEADERS=OFF -DBUILD_opencv_saliency=OFF -DCPU_DISPATCH= -DOPENCV_GENERATE_PKGCONFIG=ON -Wno-dev
cd /d D:\LINE\_prj_shared\ImageSimmilar\build
mingw32-make -j%NUMBER_OF_PROCESSORS%
mingw32-make install

cd /d D:\LINE\_prj_shared\ImageSimmilar

Somehow i got this error build for C++ using g++ compiler image

Did you know why? because golang is working just fine (although i got this error) Thanks for replying anw

huihut commented 5 years ago

Thank you for providing your solution. What you are experiencing may be an ld link error, but I don't know what caused it.