Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What im doing wrong with installing go-sdl2 #527

Open
SolindekDev opened this issue Jul 21, 2022 · 1 comment
Open

What im doing wrong with installing go-sdl2 #527

SolindekDev opened this issue Jul 21, 2022 · 1 comment

Comments

@SolindekDev
Copy link

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!

@veeableful
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants