go-vgo / robotgo

RobotGo, Go Native cross-platform RPA and GUI automation @vcaesar
Apache License 2.0
9.45k stars 859 forks source link

robotgo is incompatible with Go 1.21 #621

Closed ChristoWolf closed 7 months ago

ChristoWolf commented 8 months ago

Description

Hi!

Go 1.21 and up requires newer GCC/MinGW toolchains see this and related issues, so installing MinGW-w65 8.1.0-release-win32-seh (which includes zlib and zconf) leads to compilation issues when building robotgo, as those dependencies are not included in newer MinGW versions.

timendez commented 7 months ago

Were you able ever to get past this error? I tried downloading zlib manually but still getting this error.

ChristoWolf commented 7 months ago

Hi @timendez!

I probably could have worked around it, but lost motivation at some point.

It was missing zlib.h and zconf.h, which I added from the zlib download. That worked out fine, but then it needed libs and d-files and I gave up and created this issue. I could have vendored more things until it would have worked, but I don't want to pollute my environments with all this stuff.

IMO it would be best to update the CGo stuff to require only std stuff, or - worst case - to add scripts/taskfiles/make-files which do the heavy lifting of the setup.

vcaesar commented 7 months ago

You should use this latest Released, not need zlib and libpng, and v0.100.10 is dropped now.

vcaesar commented 7 months ago

Add v0.100.10 just default compatibility mingw-w64, you should compile the "libpng" with yourself.

timendez commented 7 months ago

Thank you all! I got it working - and at some point I think VS Code automatically downloaded robotgo at a very old version which was casuing me problems.

ChristoWolf commented 7 months ago

Have tried v0.110.0, looks good. Thanks, @vcaesar!