-
Notifications
You must be signed in to change notification settings - Fork 56
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
Strange error im getting. #41
Comments
Same error here trying to rum the example on my MacOS and golang go1.18 darwin/amd64
|
I was getting the same error, after add a missing import on C++ code, everything worked. The fix is in PR #42 |
PR #42 has still not resolved the name and type errors. It seems that problem lies in path resolution of headers. |
Not really sure what's happening here. Looks like it can't a reference for that var.
Large error below
GOROOT=/usr/local/go #gosetup
GOPATH=/Users/leki/go #gosetup
/usr/local/go/bin/go build -o /private/var/folders/1h/j6ckgx_n6td25545c0w84kn00000gn/T/GoLand/___go_build_github_com_zLeki_JJBot github.com/zLeki/JJBot #gosetup
github.com/micmonay/keybd_event
../../../go/pkg/mod/github.com/micmonay/[email protected]/keybd_darwin.go:73:2: could not determine kind of name for C.AddActionKey
../../../go/pkg/mod/github.com/micmonay/[email protected]/keybd_darwin.go:69:18: could not determine kind of name for C.CGEventRef
../../../go/pkg/mod/github.com/micmonay/[email protected]/keybd_darwin.go:85:15: could not determine kind of name for C.CreateDown
../../../go/pkg/mod/github.com/micmonay/[email protected]/keybd_darwin.go:110:13: could not determine kind of name for C.CreateUp
../../../go/pkg/mod/github.com/micmonay/[email protected]/keybd_darwin.go:107:2: could not determine kind of name for C.KeyTap
../../../go/pkg/mod/github.com/micmonay/[email protected]/keybd_darwin.go:27:21: could not determine kind of name for C.kCGEventFlagMaskAlphaShift
../../../go/pkg/mod/github.com/micmonay/[email protected]/keybd_darwin.go:30:21: could not determine kind of name for C.kCGEventFlagMaskAlternate
../../../go/pkg/mod/github.com/micmonay/[email protected]/keybd_darwin.go:31:21: could not determine kind of name for C.kCGEventFlagMaskCommand
../../../go/pkg/mod/github.com/micmonay/[email protected]/keybd_darwin.go:29:21: could not determine kind of name for C.kCGEventFlagMaskControl
../../../go/pkg/mod/github.com/micmonay/[email protected]/keybd_darwin.go:32:21: could not determine kind of name for C.kCGEventFlagMaskHelp
../../../go/pkg/mod/github.com/micmonay/[email protected]/keybd_darwin.go:35:21: could not determine kind of name for C.kCGEventFlagMaskNonCoalesced
../../../go/pkg/mod/github.com/micmonay/[email protected]/keybd_darwin.go:34:21: could not determine kind of name for C.kCGEventFlagMaskNumericPad
../../../go/pkg/mod/github.com/micmonay/[email protected]/keybd_darwin.go:33:21: could not determine kind of name for C.kCGEventFlagMaskSecondaryFn
../../../go/pkg/mod/github.com/micmonay/[email protected]/keybd_darwin.go:28:21: could not determine kind of name for C.kCGEventFlagMaskShift
cgo:
clang errors for preamble:
../../../go/pkg/mod/github.com/micmonay/[email protected]/keybd_darwin.go:7:2: error: unknown type name 'CGEventRef'
CGEventRef CreateDown(int k){
^
../../../go/pkg/mod/github.com/micmonay/[email protected]/keybd_darwin.go:8:2: error: use of undeclared identifier 'CGEventRef'
CGEventRef event = CGEventCreateKeyboardEvent (NULL, (CGKeyCode)k, true);
^
../../../go/pkg/mod/github.com/micmonay/[email protected]/keybd_darwin.go:9:9: error: use of undeclared identifier 'event'
return event;
^
../../../go/pkg/mod/github.com/micmonay/[email protected]/keybd_darwin.go:11:2: error: unknown type name 'CGEventRef'
CGEventRef CreateUp(int k){
^
../../../go/pkg/mod/github.com/micmonay/[email protected]/keybd_darwin.go:12:2: error: use of undeclared identifier 'CGEventRef'
CGEventRef event = CGEventCreateKeyboardEvent (NULL, (CGKeyCode)k, false);
^
../../../go/pkg/mod/github.com/micmonay/[email protected]/keybd_darwin.go:13:9: error: use of undeclared identifier 'event'
return event;
^
../../../go/pkg/mod/github.com/micmonay/[email protected]/keybd_darwin.go:15:14: error: unknown type name 'CGEventRef'
void KeyTap(CGEventRef event){
^
../../../go/pkg/mod/github.com/micmonay/[email protected]/keybd_darwin.go:16:14: error: use of undeclared identifier 'kCGAnnotatedSessionEventTap'
CGEventPost(kCGAnnotatedSessionEventTap, event);
^
../../../go/pkg/mod/github.com/micmonay/[email protected]/keybd_darwin.go:19:20: error: unknown type name 'CGEventFlags'; did you mean 'MPEventFlags'?
void AddActionKey(CGEventFlags type,CGEventRef event){
^~~~~~~~~~~~
MPEventFlags
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Multiprocessing.h:119:41: note: 'MPEventFlags' declared here
typedef UInt32 MPEventFlags;
^
../../../go/pkg/mod/github.com/micmonay/[email protected]/keybd_darwin.go:19:38: error: unknown type name 'CGEventRef'
void AddActionKey(CGEventFlags type,CGEventRef event){
^
10 errors generated.
Compilation finished with exit code 2
The text was updated successfully, but these errors were encountered: