When running go run
, not found.
But when listing dir
, the header is right there...
PS C:UsersphiliSourceCodegoopencv> set CGO_CPPFLAGS="-IC:/Users/phili/SourceCode/opencv/build/include"
PS C:UsersphiliSourceCodegoopencv> go run -tags customenv "C:Usersphiligopkgmodgocv.iox[email protected]cmdversionmain.go"
# gocv.io/x/gocv
In file included from aruco.cpp:1:0:
aruco.h:5:10: fatal error: opencv2/opencv.hpp: No such file or directory
#include <opencv2/opencv.hpp>
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
/* */
PS C:UsersphiliSourceCodegoopencv> dir C:UsersphiliSourceCodeopencvuildincludeopencv2opencv.hpp
Directory: C:UsersphiliSourceCodeopencvuildincludeopencv2
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 9/27/2023 9:54 AM 3558 opencv.hpp
PS C:UsersphiliSourceCodegoopencv>
我还尝试在MSYS2中安装,并出现不同的错误:
phili@PhilBook3 UCRT64 ~/gocv
$ go run "C:msys64ucrt64libgopkgmodgocv.iox[email protected]cmdversionmain.go"
# gocv.io/x/gocv
C:Usersphiligopkgmodgocv.iox[email protected]calib3d_string.go:3:9: undefined: CalibFlag
C:Usersphiligopkgmodgocv.iox[email protected]calib3d_string.go:29:9: undefined: CalibCBFlag
...
C:Usersphiligopkgmodgocv.iox[email protected]core_string.go:159:9: too many errors
我只想把它放在尽可能好的窗口上。
如果任何人有任何想法,那将是伟大的!