veandco / go-sdl2

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

Can't install go-sdl2 on Win10 #473

Closed Diamondtroller closed 3 years ago

Diamondtroller commented 3 years ago

I can't install sdl package because it returns this error:

# github.com/veandco/go-sdl2/sdl
In file included from go\src\github.com\veandco\go-sdl2\sdl\audio.go:4:
./sdl_wrapper.h:2:11: fatal error: SDL2/SDL.h: No such file or directory
  #include <SDL2/SDL.h>
           ^~~~~~~~~~~~
compilation terminated.

I'm using git bash: GNU bash, version 4.4.23(1)-release (x86_64-pc-msys) Go: go version go1.15.2 windows/amd64

veeableful commented 3 years ago

Hi @Diamondtroller, have you installed the native SDL2 libraries? You can follow the steps on the README.

Alternatively, you can also try to the static compilation step described on the README. It would use the libraries packages within the go-sdl2 package itself.

Diamondtroller commented 3 years ago

Sorry @veeableful I didn't install libs correctly, after I posted this issue I only then checked closed issues and saw #472. This was my first issue in github, sorry for inconvenience.