Closed AuroreDupont closed 9 years ago
Hi, I pushed a patch that should solve the issue. Please try again. Thanks!
pkg-config --cflags sdl2 returns: -D_THREAD_SAFE -I/homebrew/include/SDL2 (including the SDL2 folder) #include 'SDL2/SDL_syswm.h' still fails.
same on windows (cygwin). there simply is no SDL2-folder in the SDL installation.
SDL-headers are all to be put into standard include-directory without subfolder.
Changing the line 5 in syswm.go from #include <SDL2/SDL_syswm.h>
to #include <SDL_syswm.h>
will fix it.
I pushed an update again. Could you guys try it? I'm not sure about the cygwin environment though, might need to add a bit more preprocessor condition for that environment.
is there a reason for searching the SDL_syswm.h in a "SDL2"-subfolder?
As for cygwin, I'd just remove any includes containing "SDL2"-subfolder just using #include<SDL_something.h>
Same goes for (my) iMac. All package managers I know (so far) are not putting SDL-headers in a subfolder.
Just remove SDL2/
- if not a Linux-distribution installs SDL headers there by default?
I believe it's there for MinGW people. If that's not the case, let me know!
The last patch works for me. Thank you.
I have the following error:
go get -v github.com/veandco/go-sdl2/sdl{,_mixer,_image,_ttf} github.com/veandco/go-sdl2/sdl
github.com/veandco/go-sdl2/sdl
gotree/src/github.com/veandco/go-sdl2/sdl/syswm.go:5:10: fatal error: 'SDL2/SDL_syswm.h' file not found
include <SDL2/SDL_syswm.h>
Maybe the following line is missing:
cgo pkg-config: sdl2
(from http://golang.org/cmd/cgo/)