robotgo icon indicating copy to clipboard operation
robotgo copied to clipboard

fatal error: zlib.h: No such file or directory

Open qiuapeng921 opened this issue 3 years ago • 1 comments

  • Robotgo version (or commit ref):
  • Go version:
  • Gcc version:
  • Operating system and bit:
  • Resolution:
  • Can you reproduce the bug at Examples:
    • [ ] Yes (provide example code)
    • [ ] No
    • [ ] Not relevant
  • Provide example code:
package main

import (
	"github.com/go-vgo/robotgo"
)

func main() {
	robotgo.MouseSleep = 100

	robotgo.ScrollMouse(10, "up")
	robotgo.ScrollMouse(20, "right")

	robotgo.Scroll(0, -10)
	robotgo.Scroll(100, 0)

	robotgo.MilliSleep(100)
	robotgo.ScrollSmooth(-10, 6)
	// robotgo.ScrollRelative(10, -100)

	robotgo.Move(10, 20)
	robotgo.MoveRelative(0, -10)
	robotgo.DragSmooth(10, 10)

	robotgo.Click("wheelRight")
	robotgo.Click("left", true)
	robotgo.MoveSmooth(100, 200, 1.0, 10.0)

	robotgo.Toggle("left")
	robotgo.Toggle("left", "up")
}
  • Log gist:

Description

image

...

qiuapeng921 avatar Aug 06 '22 23:08 qiuapeng921

You need install mingw-64 on your windows.https://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/ image

FGadvancer avatar Sep 12 '22 04:09 FGadvancer

Yes. Download the zip file on the tail of the red arrow, unzip it and move the directory mingw64 to C: Then execute the following commands:

go env -w CC=C:\mingw64\bin\gcc
go env -w CXX=C:\mingw64\bin\g++

Now go build should run successfully.

All the credit goes to Carson on SO.

mardukbp avatar Nov 06 '22 17:11 mardukbp