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

central undefined #99

Open
barustnt opened this issue Aug 9, 2018 · 6 comments
Open

central undefined #99

barustnt opened this issue Aug 9, 2018 · 6 comments

Comments

@barustnt
Copy link

barustnt commented Aug 9, 2018

hello
with go 1.10 and when i build server.go i have this message
"undefined: central"
any help please !!?

@brunoterkaly
Copy link

brunoterkaly commented Dec 5, 2018

I have the proper GOPATH/GOROOT.

When I do a "go get github.com/paypal/gatt"

The output I get is:

github.com/paypal/gatt
c:\go\src\github.com\paypal\gatt\central.go:118:11: undefined: central

Any tricks to getting golang to compile gatt?

@brunoterkaly
Copy link

brunoterkaly commented Dec 5, 2018

The trick is to not use Windows. You can cross compile as needed. I went to Ubuntu and it just worked.

@barustnt
Copy link
Author

barustnt commented Dec 5, 2018 via email

@brunoterkaly
Copy link

I'm good - I cross-compiled on Linux for Raspberry PI arch and I hope it wall works.

@barustnt
Copy link
Author

barustnt commented Dec 5, 2018 via email

@wz2b
Copy link

wz2b commented Feb 5, 2020

What causes this, though?

type Central interface {
   ID() string   // ID returns platform specific ID of the remote central device.
   Close() error // Close disconnects the connection.
   MTU() int     // MTU returns the current connection mtu.
}
type notifier struct {
  central *central
   a       *attr
   maxlen  int
   donemu  sync.RWMutex
   done    bool
}

I'm not sure why that's central (the type) with a small c ... but even if you chagne that to Central it fails with the same error. From a language perspective I don't understand what's wrong.

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