Giter Club home page Giter Club logo

Comments (3)

daibertdiego avatar daibertdiego commented on August 29, 2024

Same error here trying to rum the example on my MacOS and golang go1.18 darwin/amd64

# 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/MacOSX.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.

from keybd_event.

thalesog avatar thalesog commented on August 29, 2024

I was getting the same error, after add a missing import on C++ code, everything worked.

The fix is in PR #42

from keybd_event.

PrabhakarRai avatar PrabhakarRai commented on August 29, 2024

PR #42 has still not resolved the name and type errors. It seems that problem lies in path resolution of headers.

from keybd_event.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.