Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The new version has an error #700

Open
zzxctk opened this issue Dec 8, 2024 · 2 comments
Open

The new version has an error #700

zzxctk opened this issue Dec 8, 2024 · 2 comments

Comments

@zzxctk
Copy link

zzxctk commented Dec 8, 2024

go version 1.23.2
robotgo version v0.110.5
System version windows 11
When debugging, error:
GOROOT=D:\go\sdk\go1.23.2 #gosetup
GOPATH=D:\go\GoPATH #gosetup
D:\go\sdk\go1.23.2\bin\go.exe build -o C:\Users\Administrator\AppData\Local\JetBrains\IntelliJIdea2024.3\tmp\GoLand___5main.exe -gcflags "all=-N -l" D:\bnx\MDFLCQD\main.go #gosetup

github.com/go-vgo/robotgo

vendor\github.com\go-vgo\robotgo\key.go:15:10: fatal error: key/keypress_c.h: No such file or directory
#include "key/keypress_c.h"
^~~~~~~~~~~~~~~~~~
compilation terminated.

@make-42
Copy link

make-42 commented Dec 22, 2024

I second this

@TheDanDLion
Copy link

TheDanDLion commented Jan 29, 2025

I was getting this exact same error on Ubuntu, but I believe this might be related to the issue mentioned in the README golang/go#26366

the files were getting pruned and the C files weren't in the vendor folder. dummy files were added in the packages so we can import them manually, so in my main.go I imported them like so:

import (
	_ "github.com/go-vgo/robotgo/base"
	_ "github.com/go-vgo/robotgo/key"
	_ "github.com/go-vgo/robotgo/mouse"
	_ "github.com/go-vgo/robotgo/screen"
	_ "github.com/go-vgo/robotgo/window"
)

then running go mod vendor again to pull the packages from the module. after that everything worked fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants