go-sdl2
go-sdl2 copied to clipboard
README: Added an extra step for include/library flags in windows installations
Yo,
I faced some issues when following the windows installation steps when compiling, so I had to add include flags manually:
In file included from C:\Users\redacted\go\pkg\mod\github.com\veandco\[email protected]\sdl\audio.go:4:
./sdl_wrapper.h:2:18: fatal error: SDL2/SDL.h: No such file or directory
2 | #include <SDL2/SDL.h>
| ^~~~
compilation terminated.
I found some other people complaining about this error as well and after searching a little bit, I saw that you can add CGO flags from environment variables.
go1.22.6
Platform: W11 Enterprise 23H2 Processor AMD Ryzen 7 PRO 5875U with Radeon Graphics 2.00 GHz Installed RAM 64,0 GB (62,8 GB usable) System type 64-bit operating system, x64-based processor
Thanks @Yosoku, last time I tried it shouldn't be necessary to specify additional flags but I will review the instructions again once I have access to a Windows machine.
Added my go version as well
Hi @Yosoku, I tried to install on Windows 11 following README instructions and it seems to be fine. Does your installation look like this?