go-i2c icon indicating copy to clipboard operation
go-i2c copied to clipboard

undefined: I2C_SLAVE

Open heatxsink opened this issue 4 years ago • 5 comments

Trying to go get this and ... no dice.

go get -u github.com/d2r2/go-i2c
# github.com/d2r2/go-i2c
../../../../pkg/mod/github.com/d2r2/[email protected]/i2c.go:36:26: undefined: I2C_SLAVE

heatxsink avatar Jul 04 '20 08:07 heatxsink

Hi @heatxsink. Could you specify what OS you employ? Be aware, that this library works only with Linux systems. No Windows, no FreeBSD...

d2r2 avatar Jul 05 '20 18:07 d2r2

got the same error, running on macOS (darwin)

lukibahr avatar Dec 06 '20 12:12 lukibahr

@lukibahr , I'm sorry, macOS (FreeBSD, Windows as well) is not supported. And if you try to compile this code directly on macOS, I assume this is mistake and you should use cross compilation approach, because you don't have intention to run this code on macOS, right?

d2r2 avatar Feb 13 '21 05:02 d2r2

okay, thank you for your hint. Cross compiling the code for UNIX will be enough for me.

lukibahr avatar Feb 15 '21 08:02 lukibahr

@lukibahr, I will recommend additionally take a look at these comments, where, as I remember we have discussed same aspect: https://github.com/d2r2/go-dht/issues/11#issuecomment-472924091

d2r2 avatar Feb 17 '21 03:02 d2r2