-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
Not compatible with Go 1.21.0 #577
Comments
Hi @dsoechting, would you be able to provide a minimal example project that reproduces the issue? I was able to use Go 1.21 on my Linux and macOS with go-sdl2 v0.4.35. |
@dsoechting Looks like you have |
This also occurred with me. go version go1.21.0 windows/amd64 As @gen2brain mentioned the env setting for this is CGO_ENABLED=0 I'm a little lost on how to change this setting being a very fresh noob to Go (I don't think I am using the right keywords to search for it). Any suggestions would be appreciated. |
Hi @Yagisanatode, you could try putting it before the command. For example, |
@veeableful thanks for the guidance. My issue ended up being a combination on failing to add the g++.exe file and not adding the sdl2 dll to the module path. |
Would love to contribute to this if this is still relevant |
@ramizpolic I don't think there is much to contribute here. Perhaps adding some notes for users in documentation, how it looks when there is no C compiler, how it looks when CGO is disabled etc. Something like that maybe, |
Go version: 1.21.0
Go-SDL2 version: v0.4.35
SDL2 version: 2.0.20
OS: Windows 10 (19045.3324) -> Ubuntu 22.04.2 LTS through WSL2
Architecture: x86-64 (Ryzen 3700x CPU)
When I installed the Go module, none of the go-sdl2 functions were accessible from my application code besides some Btoi function in a file called helper.go. I could see all of the source code when looking at the module from my file system, but could not use most it.
I resolved my issue by downgrading to Go 1.20.7. Perhaps a note in the documentation could be made.
The text was updated successfully, but these errors were encountered: