Closed zzy444626905 closed 11 months ago
GOROOT=D:\download\go\go #gosetup GOPATH=D:\download\go\go\gopath #gosetup D:\download\go\go\bin\go.exe build -o C:\Users\zyzhang60\go\src\server-manager\PushStream\PushStream.exe . #gosetup # server-manager/PushStream D:\download\go\go\pkg\tool\windows_amd64\link.exe: running g++ failed: exit status 1 C:\Users\zyzhang60\AppData\Local\Temp\go-link-366771185\000020.o:aruco.cpp:(.text+0x22): undefined reference to `cv::aruco::getPredefinedDictionary(cv::aruco::PredefinedDictionaryType)' C:\Users\zyzhang60\AppData\Local\Temp\go-link-366771185\000020.o:aruco.cpp:(.text+0x5b): undefined reference to `cv::aruco::RefineParameters::RefineParameters(float, float, bool)' C:\Users\zyzhang60\AppData\Local\Temp\go-link-366771185\000020.o:aruco.cpp:(.text+0x80): undefined reference to `cv::aruco::ArucoDetector::ArucoDetector(cv::aruco::Dictionary const&, cv::aruco::DetectorParameters const&, cv::aruco::RefineParameters const&)' C:\Users\zyzhang60\AppData\Local\Temp\go-link-366771185\000020.o:aruco.cpp:(.text+0xfd): undefined reference to `cv::aruco::RefineParameters::RefineParameters(float, float, bool)' C:\Users\zyzhang60\AppData\Local\Temp\go-link-366771185\000020.o:aruco.cpp:(.text+0x124): undefined reference to `cv::aruco::ArucoDetector::ArucoDetector(cv::aruco::Dictionary const&, cv::aruco::DetectorParameters const&, cv::aruco::RefineParameters const&)' C:\Users\zyzhang60\AppData\Local\Temp\go-link-366771185\000020.o:aruco.cpp:(.text+0x221): undefined reference to `cv::aruco::ArucoDetector::detectMarkers(cv::_InputArray const&, cv::_OutputArray const&, cv::_OutputArray const&, cv::_OutputArray const&) const' ... Compilation finished with exit code 1
1. 2. 3. 4.
windows10 go version go1.20.3 windows/amd64 opencv4.8.1 gocv.io/x/gocv v0.35.0
env.sh
env.cmd
go run
go build
i got it, opencv4.8.1 has not been compiled and installed rightly
May I ask how it was resolved? I encountered the same problem
opencv4.8.1 has been compiled and installed, but an error occurred when running gocv
Description
Steps to Reproduce
1. 2. 3. 4.
Your Environment
env.sh
orenv.cmd
script before trying togo run
orgo build
?