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

What im doing wrong with installing go-sdl2

Open SolindekDev opened this issue 1 year ago • 1 comments

Hi i have a problem with go-sdl2 first i create go module next install all package on debian next write some sdl2 code in golang and go mod tidy then i go build it and there's this loong warning

# github.com/veandco/go-sdl2/sdl
In file included from _cgo_export.c:4:
hints.go:152: warning: "SDL_HINT_JOYSTICK_ROG_CHAKRAM" redefined
In file included from /usr/local/include/SDL2/SDL.h:46,
                 from ../../go/pkg/mod/github.com/veandco/[email protected]/sdl/sdl_wrapper.h:5,
                 from events.go:4,
                 from _cgo_export.c:4:
/usr/local/include/SDL2/SDL_hints.h:820: note: this is the location of the previous definition
  820 | #define SDL_HINT_JOYSTICK_ROG_CHAKRAM "SDL_JOYSTICK_ROG_CHAKRAM"
      | 
In file included from _cgo_export.c:4:
hints.go:153: warning: "SDL_HINT_X11_WINDOW_TYPE" redefined
In file included from /usr/local/include/SDL2/SDL.h:46,
                 from ../../go/pkg/mod/github.com/veandco/[email protected]/sdl/sdl_wrapper.h:5,
                 from events.go:4,
                 from _cgo_export.c:4:
/usr/local/include/SDL2/SDL_hints.h:1882: note: this is the location of the previous definition
 1882 | #define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE"
      | 
# github.com/veandco/go-sdl2/sdl
../../go/pkg/mod/github.com/veandco/[email protected]/sdl/hints.go:152: warning: "SDL_HINT_JOYSTICK_ROG_CHAKRAM" redefined
  152 | #define SDL_HINT_JOYSTICK_ROG_CHAKRAM ""
      | 
In file included from /usr/local/include/SDL2/SDL.h:46,
                 from ../../go/pkg/mod/github.com/veandco/[email protected]/sdl/sdl_wrapper.h:5,
                 from ../../go/pkg/mod/github.com/veandco/[email protected]/sdl/hints.go:4:
/usr/local/include/SDL2/SDL_hints.h:820: note: this is the location of the previous definition
  820 | #define SDL_HINT_JOYSTICK_ROG_CHAKRAM "SDL_JOYSTICK_ROG_CHAKRAM"
      | 
../../go/pkg/mod/github.com/veandco/[email protected]/sdl/hints.go:153: warning: "SDL_HINT_X11_WINDOW_TYPE" redefined
  153 | #define SDL_HINT_X11_WINDOW_TYPE ""
      | 
In file included from /usr/local/include/SDL2/SDL.h:46,
                 from ../../go/pkg/mod/github.com/veandco/[email protected]/sdl/sdl_wrapper.h:5,
                 from ../../go/pkg/mod/github.com/veandco/[email protected]/sdl/hints.go:4:
/usr/local/include/SDL2/SDL_hints.h:1882: note: this is the location of the previous definition
 1882 | #define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE"
      | 
# github.com/veandco/go-sdl2/sdl
In file included from events.c:1:
hints.go:152: warning: "SDL_HINT_JOYSTICK_ROG_CHAKRAM" redefined
  152 | #define SDL_HINT_JOYSTICK_ROG_CHAKRAM ""
      | 
In file included from /usr/local/include/SDL2/SDL.h:46,
                 from ../../go/pkg/mod/github.com/veandco/[email protected]/sdl/sdl_wrapper.h:5,
                 from events.go:4,
                 from events.c:1:
/usr/local/include/SDL2/SDL_hints.h:820: note: this is the location of the previous definition
  820 | #define SDL_HINT_JOYSTICK_ROG_CHAKRAM "SDL_JOYSTICK_ROG_CHAKRAM"
      | 
In file included from events.c:1:
hints.go:153: warning: "SDL_HINT_X11_WINDOW_TYPE" redefined
  153 | #define SDL_HINT_X11_WINDOW_TYPE ""
      | 
In file included from /usr/local/include/SDL2/SDL.h:46,
                 from ../../go/pkg/mod/github.com/veandco/[email protected]/sdl/sdl_wrapper.h:5,
                 from events.go:4,
                 from events.c:1:
/usr/local/include/SDL2/SDL_hints.h:1882: note: this is the location of the previous definition
 1882 | #define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE"
      | 
# github.com/veandco/go-sdl2/sdl
In file included from hints.c:1:
hints.go:152: warning: "SDL_HINT_JOYSTICK_ROG_CHAKRAM" redefined
  152 | #define SDL_HINT_JOYSTICK_ROG_CHAKRAM ""
      | 
In file included from /usr/local/include/SDL2/SDL.h:46,
                 from ../../go/pkg/mod/github.com/veandco/[email protected]/sdl/sdl_wrapper.h:5,
                 from events.go:4,
                 from hints.c:1:
/usr/local/include/SDL2/SDL_hints.h:820: note: this is the location of the previous definition
  820 | #define SDL_HINT_JOYSTICK_ROG_CHAKRAM "SDL_JOYSTICK_ROG_CHAKRAM"
      | 
In file included from hints.c:1:
hints.go:153: warning: "SDL_HINT_X11_WINDOW_TYPE" redefined
  153 | #define SDL_HINT_X11_WINDOW_TYPE ""
      | 
In file included from /usr/local/include/SDL2/SDL.h:46,
                 from ../../go/pkg/mod/github.com/veandco/[email protected]/sdl/sdl_wrapper.h:5,
                 from events.go:4,
                 from hints.c:1:
/usr/local/include/SDL2/SDL_hints.h:1882: note: this is the location of the previous definition
 1882 | #define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE"
      | 
# github.com/veandco/go-sdl2/sdl
In file included from log.c:1:
hints.go:152: warning: "SDL_HINT_JOYSTICK_ROG_CHAKRAM" redefined
  152 | #define SDL_HINT_JOYSTICK_ROG_CHAKRAM ""
      | 
In file included from /usr/local/include/SDL2/SDL.h:46,
                 from ../../go/pkg/mod/github.com/veandco/[email protected]/sdl/sdl_wrapper.h:5,
                 from events.go:4,
                 from log.c:1:
/usr/local/include/SDL2/SDL_hints.h:820: note: this is the location of the previous definition
  820 | #define SDL_HINT_JOYSTICK_ROG_CHAKRAM "SDL_JOYSTICK_ROG_CHAKRAM"
      | 
In file included from log.c:1:
hints.go:153: warning: "SDL_HINT_X11_WINDOW_TYPE" redefined
  153 | #define SDL_HINT_X11_WINDOW_TYPE ""
      | 
In file included from /usr/local/include/SDL2/SDL.h:46,
                 from ../../go/pkg/mod/github.com/veandco/[email protected]/sdl/sdl_wrapper.h:5,
                 from events.go:4,
                 from log.c:1:
/usr/local/include/SDL2/SDL_hints.h:1882: note: this is the location of the previous definition
 1882 | #define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE"
      | 
# github.com/veandco/go-sdl2/sdl
In file included from system.c:1:
hints.go:152: warning: "SDL_HINT_JOYSTICK_ROG_CHAKRAM" redefined
  152 | #define SDL_HINT_JOYSTICK_ROG_CHAKRAM ""
      | 
In file included from /usr/local/include/SDL2/SDL.h:46,
                 from ../../go/pkg/mod/github.com/veandco/[email protected]/sdl/sdl_wrapper.h:5,
                 from events.go:4,
                 from system.c:1:
/usr/local/include/SDL2/SDL_hints.h:820: note: this is the location of the previous definition
  820 | #define SDL_HINT_JOYSTICK_ROG_CHAKRAM "SDL_JOYSTICK_ROG_CHAKRAM"
      | 
In file included from system.c:1:
hints.go:153: warning: "SDL_HINT_X11_WINDOW_TYPE" redefined
  153 | #define SDL_HINT_X11_WINDOW_TYPE ""
      | 
In file included from /usr/local/include/SDL2/SDL.h:46,
                 from ../../go/pkg/mod/github.com/veandco/[email protected]/sdl/sdl_wrapper.h:5,
                 from events.go:4,
                 from system.c:1:
/usr/local/include/SDL2/SDL_hints.h:1882: note: this is the location of the previous definition
 1882 | #define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE"
      | 

but ./app is creating when i am starting it there's this error message:

solindek_@debian:~/Documents/Tal$ ./app
panic: No available video device

goroutine 1 [running, locked to thread]:
main.main()
        /home/solindek_/Documents/Tal/main.go:7 +0x254

im using code from the example please help me!

SolindekDev avatar Jul 21 '22 09:07 SolindekDev

Hi @SolindekDev, could you let me know your version of SDL2?

veeableful avatar Jul 21 '22 12:07 veeableful