clausecker / freefare

Go bindings for the libfreefare
GNU Lesser General Public License v3.0
18 stars 3 forks source link

Type error #7

Closed agustim closed 5 years ago

agustim commented 5 years ago

I try to use you package, but I recive some type error:

$ go get -v ./...
github.com/fuzxxl/freefare/0.3/freefare
# github.com/fuzxxl/freefare/0.3/freefare
../../fuzxxl/freefare/0.3/freefare/tag.go:137:31: cannot use *tagptr (type _Ctype_FreefareTag) as type _Ctype_MifareTag in argument to wrapTag
../../fuzxxl/freefare/0.3/freefare/tag.go:141:10: cannot use (*_Ctype_MifareTag)(unsafe.Pointer(iptr)) (type *_Ctype_MifareTag) as type *_Ctype_FreefareTag in assignment
../../fuzxxl/freefare/0.3/freefare/tag.go:160:42: cannot use *cinfo (type _Ctype_struct___8) as type _Ctype_struct___5 in assignment
../../fuzxxl/freefare/0.3/freefare/tag.go:172:16: cannot use ctag (type _Ctype_FreefareTag) as type _Ctype_MifareTag in argument to wrapTag

Go version:

$ go version
go version go1.12.4 linux/amd64
clausecker commented 5 years ago

Which version of the libfreefare have you installed? You need to use the most recent stable release (0.4.0) as they changed bits and pieces of the interface around afterwards but never made another release.

agustim commented 5 years ago

You right, this is the problem, but I used master branch from libfreefare ( https://aur.archlinux.org/packages/libfreefare-git/ ), now I'm changing to libfreefare relase 0.4.0 and can use this binding. Thx!