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

README: Added an extra step for include/library flags in windows installations

Open Yosoku opened this issue 1 year ago • 3 comments

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

Yosoku avatar Sep 14 '24 08:09 Yosoku

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.

veeableful avatar Sep 16 '24 12:09 veeableful

Added my go version as well

Yosoku avatar Sep 16 '24 17:09 Yosoku

Hi @Yosoku, I tried to install on Windows 11 following README instructions and it seems to be fine. Does your installation look like this? Screenshot 2024-10-05 at 10 57 36 AM

veeableful avatar Oct 05 '24 02:10 veeableful