如果我想在windows 10下使用robotgo运行任何代码,我会得到以下错误:
# github.com/go-vgo/robotgo
In file included from ./bitmap/../base/str_io_c.h:2:0,
from ./bitmap/goBitmap.h:17,
from ..\go\src\github.com\go-vgo\robotgo\robotgo.go:45:
./bitmap/../base/zlib_util_c.h:2:18: fatal error: zlib.h: No such file or directory
compilation terminated.我的路径变量:
https://i.imgur.com/BouDZEV.png
跟踪安装并仔细研究问题。
https://github.com/go-vgo/robotgo#installation
这里有一个类似的错误:https://github.com/go-vgo/robotgo/issues/100
但是他们的修正“解决了,应该改变gcc编译器在%路径%”没有为我工作。
import (
"github.com/go-vgo/robotgo"
)
func main() {
robotgo.ScrollMouse(10, "up")
robotgo.MouseClick("left", true)
robotgo.MoveMouseSmooth(100, 200, 1.0, 100.0)
}发布于 2020-12-22 12:42:49
我试过下面的这个,为我工作
https://github.com/lowkey42/MagnumOpus/wiki/TDM-GCC-Mingw64-Installation#zlib-x64
从这个链接下载 ZLIB x64
将_\zlib\bin复制到\TDM\bin 将_\zlib\bin复制到\Git\bin 复制\zlib\include到\TDM\include 将\zlib\lib复制到\TDM\lib
https://stackoverflow.com/questions/58793857
复制相似问题