veandco / go-sdl2

SDL2 binding for Go
https://godoc.org/github.com/veandco/go-sdl2
BSD 3-Clause "New" or "Revised" License
2.18k stars 219 forks source link

could not determine kind of name for C.SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH #421

Open bussiere opened 4 years ago

bussiere commented 4 years ago

On windows :

D:\eu\Workspace\Emissaries>go get github.com/veandco/go-sdl2/sdl
go: finding github.com/veandco/go-sdl2/sdl latest
# github.com/veandco/go-sdl2/sdl
C:\Users\martin\go\pkg\mod\github.com\veandco\go-sdl2@v0.3.0\sdl\hints.go:86:50:
could not determine kind of name for C.SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH
D:\eu\Workspace\Emissaries>go version
go version go1.12.6 windows/386
veeableful commented 4 years ago

Hi @bussiere,

Could you please try the newly created v0.3.1? I back-ported some commits from master that fixed it. Seems to work on my macOS!

bussiere commented 4 years ago

@veeableful will try monday thanks for your work :)

bussiere commented 4 years ago

Now i have a new error :

D:\eu\Workspace\Emissaries>go get github.com/veandco/go-sdl2/sdl
# github.com/veandco/go-sdl2/sdl
cannot parse $WORK\b001\_cgo_.o as ELF, Mach-O, PE or XCOFF
veeableful commented 4 years ago

Hi @bussiere, could you try running go get -v -u github.com/veandco/go-sdl2/sdl?

It looks like there's some uncleaned Go files but I'm not entirely sure how to clean them. Perhaps running go install -a in the $GOPATH/src/github.com/veandco/go-sdl2/sdl would work as well.

kroppt commented 4 years ago

I had this issue, and it was fixed when I downloaded master, currently at 68b56f2c64c36f41da33d0985dc5f173ae7cb0f9. I am not sure which version I had before.

cburchert commented 4 years ago

SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH was removed from SDL:

https://hg.libsdl.org/SDL/rev/d581caf613cd

A compatibility fix was done here: https://github.com/veandco/go-sdl2/blob/68b56f2c64c36f41da33d0985dc5f173ae7cb0f9/sdl/hints.go#L76

So this is fixed after this commit: https://github.com/veandco/go-sdl2/commit/43b59213bee65745ca265afae4168f2e25403735