gocv
gocv copied to clipboard
The examples in the gocv library cannot be run after compiling opencv from the documentation
Description
Run error
E:\desktop\env\util\opencv\gocv>go run cmd/version/main.go
# runtime/cgo
E:/desktop/env/util/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_core
E:/desktop/env/util/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_face
E:/desktop/env/util/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_videoio
E:/desktop/env/util/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_imgproc
E:/desktop/env/util/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_highgui
E:/desktop/env/util/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_imgcodecs
E:/desktop/env/util/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_objdetect
E:/desktop/env/util/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_features2d
E:/desktop/env/util/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_video
E:/desktop/env/util/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_dnn
E:/desktop/env/util/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_xfeatures2d
collect2.exe: error: ld returned 1 exit status
Your Environment
- Operating System and version: window10 x64
- OpenCV version used: opencv-4.7.0
- How did you install OpenCV: Install by win_build_opencv.cmd
- GoCV version used: v0.33.0
- Go version: go1.16.12
- Did you run the
env.sh
orenv.cmd
script before trying togo run
orgo build
?
The contents of the env.cmd
··· ECHO This script is no longer necessary and has been deprecated. ECHO See the Custom Environment section of the README if you need to customize your environment. ···